diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a29d5f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,68 @@ +.gradle +build/ +!gradle/wrapper/gradle-wrapper.jar +!**/src/main/**/build/ +!**/src/test/**/build/ + +### IntelliJ IDEA ### +.idea/modules.xml +.idea/jarRepositories.xml +.idea/compiler.xml +.idea/workspace.xml +.idea/libraries/ +*.iws +*.iml +*.ipr +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store + +/Ability +/Bundle +/Comment +/Default +/Edge +/Fault +/Level +/Note +/Site +/Title +/Twilight +/UI +/Vote +/Www +/src/main/resources/Client.json +/Awilight.py +/Banned IP.json +/Banned Note.json +/Configure.json +/History.json +/Platform ID.json +/Quality.json +/Twilight.jar +/Twilight.jks \ No newline at end of file diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..1bec35e --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,10 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml new file mode 100644 index 0000000..79ee123 --- /dev/null +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/.idea/gradle.xml b/.idea/gradle.xml new file mode 100644 index 0000000..79d0fb4 --- /dev/null +++ b/.idea/gradle.xml @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml new file mode 100644 index 0000000..e805548 --- /dev/null +++ b/.idea/kotlinc.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..24f62aa --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Twilight.cmd b/Twilight.cmd new file mode 100644 index 0000000..105fddd --- /dev/null +++ b/Twilight.cmd @@ -0,0 +1,43 @@ +@ECHO OFF + +DEL Twilight.jar + +CALL gradlew buildFatJar +Robocopy build\libs . Twilight.jar + +CHOICE /M TEST +SET TEST=%ERRORLEVEL% +IF %TEST% == 1 ( + CALL gradlew test +) +IF %TEST% == 1 ( + IF NOT %ERRORLEVEL% == 0 ( + PAUSE + ) +) +IF %TEST% == 1 ( + wsl java -jar Twilight.jar --test +) + +CHOICE /M PATCH +IF %ERRORLEVEL% == 1 ( + Robocopy . \\taehui\taehui Twilight.jar + + wsl ssh taehui@taehui sudo service twilight stop + timeout 5 + wsl ssh taehui@taehui sudo cp Twilight.jar /var/twilight/Twilight.jar + wsl ssh taehui@taehui sudo service twilight start + + wsl ssh taehui@taehui rm -r Twilight.jar +) + +CHOICE /M VCS +IF %ERRORLEVEL% == 1 ( + git add * + git commit -m v1.0-SNAPSHOT + git checkout master + git merge develop + git push + git checkout develop + git push +) \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts new file mode 100644 index 0000000..22d3dc6 --- /dev/null +++ b/build.gradle.kts @@ -0,0 +1,78 @@ +import org.jetbrains.kotlin.gradle.tasks.KotlinCompile + +plugins { + kotlin("jvm") version "1.9.20" + application + id("io.ktor.plugin") version "2.3.5" +} + +group = "net.taehui" +version = "1.0-SNAPSHOT" + +repositories { + mavenCentral() +} + +dependencies { + implementation("com.fasterxml.jackson.core:jackson-annotations:2.15.3") + implementation("com.fasterxml.jackson.core:jackson-core:2.15.3") + implementation("com.fasterxml.jackson.core:jackson-databind:2.15.3") + implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.15.3") + implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.3") + implementation("com.github.pemistahl:lingua:1.2.2") + implementation("com.google.protobuf:protobuf-java:3.25.0") + implementation("com.google.protobuf:protobuf-kotlin:3.25.0") + implementation("com.ibm.icu:icu4j:74.1") + implementation("com.lmax:disruptor:3.4.4") + implementation("com.sun.mail:jakarta.mail:2.0.1") + implementation("commons-cli:commons-cli:1.6.0") + implementation("commons-codec:commons-codec:1.16.0") + implementation("commons-io:commons-io:2.15.0") + implementation("io.netty:netty-all:4.1.100.Final") + implementation("jakarta.mail:jakarta.mail-api:2.1.2") + implementation("net.dv8tion:JDA:5.0.0-beta.16") + implementation("org.apache.commons:commons-compress:1.24.0") + implementation("org.apache.commons:commons-dbcp2:2.11.0") + implementation("org.apache.commons:commons-lang3:3.13.0") + implementation("org.apache.httpcomponents.client5:httpclient5:5.2.1") + implementation("org.apache.logging.log4j:log4j-api:2.21.1") + implementation("org.apache.logging.log4j:log4j-core:2.21.1") + implementation("org.apache.logging.log4j:log4j-slf4j-impl:2.21.1") + implementation("org.fusesource.jansi:jansi:2.4.1") + implementation("org.jline:jline:3.24.1") + implementation("org.jline:jline-terminal-jansi:3.24.1") + implementation("org.jsoup:jsoup:1.16.2") + implementation("org.mariadb.jdbc:mariadb-java-client:3.2.0") + implementation("org.python:jython-standalone:2.7.3") + implementation("org.seleniumhq.selenium:selenium-edge-driver:4.15.0") + implementation("org.seleniumhq.selenium:selenium-java:4.15.0") + implementation("org.tukaani:xz:1.9") + implementation(kotlin("stdlib-jdk8")) + testImplementation(kotlin("test")) +} + +kotlin { + jvmToolchain(21) +} + +tasks.test { + useJUnitPlatform() +} + +tasks.shadowJar { + isZip64 = true +} + +tasks.withType { + kotlinOptions.jvmTarget = "21" +} + +application { + mainClass.set("net.taehui.twilight.Twilight") +} + +ktor { + fatJar { + archiveFileName.set("Twilight.jar") + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..7fc6f1f --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +kotlin.code.style=official diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..249e583 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..29d2731 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..1b6c787 --- /dev/null +++ b/gradlew @@ -0,0 +1,234 @@ +#!/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/master/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 + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit + +APP_NAME="Gradle" +APP_BASE_NAME=${0##*/} + +# 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"' + +# 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 + which java >/dev/null 2>&1 || 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 + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + 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 + +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# 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..107acd3 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,89 @@ +@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=. +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%" == "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%"=="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! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/msedgedriver.exe b/msedgedriver.exe new file mode 100644 index 0000000..92a8cd5 --- /dev/null +++ b/msedgedriver.exe Binary files differ diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 0000000..8a4226e --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,3 @@ + +rootProject.name = "Twilight" + diff --git a/src/main/java/net/taehui/CommentClass.java b/src/main/java/net/taehui/CommentClass.java new file mode 100644 index 0000000..dcab434 --- /dev/null +++ b/src/main/java/net/taehui/CommentClass.java @@ -0,0 +1,6466 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Comment.proto + +// Protobuf Java Version: 3.25.0 +package net.taehui; + +public final class CommentClass { + private CommentClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface CommentOrBuilder extends + // @@protoc_insertion_point(interface_extends:Comment) + com.google.protobuf.MessageOrBuilder { + + /** + * string date = 1; + * @return The date. + */ + java.lang.String getDate(); + /** + * string date = 1; + * @return The bytes for date. + */ + com.google.protobuf.ByteString + getDateBytes(); + + /** + * int32 highestJudgment = 2; + * @return The highestJudgment. + */ + int getHighestJudgment(); + + /** + * int32 higherJudgment = 3; + * @return The higherJudgment. + */ + int getHigherJudgment(); + + /** + * int32 highJudgment = 4; + * @return The highJudgment. + */ + int getHighJudgment(); + + /** + * int32 lowJudgment = 5; + * @return The lowJudgment. + */ + int getLowJudgment(); + + /** + * int32 lowerJudgment = 6; + * @return The lowerJudgment. + */ + int getLowerJudgment(); + + /** + * int32 lowestJudgment = 7; + * @return The lowestJudgment. + */ + int getLowestJudgment(); + + /** + * repeated .InputEvent inputs = 8; + */ + java.util.List + getInputsList(); + /** + * repeated .InputEvent inputs = 8; + */ + net.taehui.CommentClass.InputEvent getInputs(int index); + /** + * repeated .InputEvent inputs = 8; + */ + int getInputsCount(); + /** + * repeated .InputEvent inputs = 8; + */ + java.util.List + getInputsOrBuilderList(); + /** + * repeated .InputEvent inputs = 8; + */ + net.taehui.CommentClass.InputEventOrBuilder getInputsOrBuilder( + int index); + + /** + * repeated .MultiplierEvent multipliers = 9; + */ + java.util.List + getMultipliersList(); + /** + * repeated .MultiplierEvent multipliers = 9; + */ + net.taehui.CommentClass.MultiplierEvent getMultipliers(int index); + /** + * repeated .MultiplierEvent multipliers = 9; + */ + int getMultipliersCount(); + /** + * repeated .MultiplierEvent multipliers = 9; + */ + java.util.List + getMultipliersOrBuilderList(); + /** + * repeated .MultiplierEvent multipliers = 9; + */ + net.taehui.CommentClass.MultiplierEventOrBuilder getMultipliersOrBuilder( + int index); + + /** + * repeated .PaintEvent paints = 10; + */ + java.util.List + getPaintsList(); + /** + * repeated .PaintEvent paints = 10; + */ + net.taehui.CommentClass.PaintEvent getPaints(int index); + /** + * repeated .PaintEvent paints = 10; + */ + int getPaintsCount(); + /** + * repeated .PaintEvent paints = 10; + */ + java.util.List + getPaintsOrBuilderList(); + /** + * repeated .PaintEvent paints = 10; + */ + net.taehui.CommentClass.PaintEventOrBuilder getPaintsOrBuilder( + int index); + + /** + * int32 loopUnit = 11; + * @return The loopUnit. + */ + int getLoopUnit(); + + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + java.util.List + getJudgmentMetersList(); + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + net.taehui.CommentClass.JudgmentMeterEvent getJudgmentMeters(int index); + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + int getJudgmentMetersCount(); + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + java.util.List + getJudgmentMetersOrBuilderList(); + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + net.taehui.CommentClass.JudgmentMeterEventOrBuilder getJudgmentMetersOrBuilder( + int index); + + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + java.util.List + getAudioMultipliersList(); + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + net.taehui.CommentClass.AudioMultiplierEvent getAudioMultipliers(int index); + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + int getAudioMultipliersCount(); + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + java.util.List + getAudioMultipliersOrBuilderList(); + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + net.taehui.CommentClass.AudioMultiplierEventOrBuilder getAudioMultipliersOrBuilder( + int index); + + /** + * double levyingMultiplier = 14; + * @return The levyingMultiplier. + */ + double getLevyingMultiplier(); + + /** + * double levyingAudioMultiplier = 15; + * @return The levyingAudioMultiplier. + */ + double getLevyingAudioMultiplier(); + } + /** + * Protobuf type {@code Comment} + */ + public static final class Comment extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Comment) + CommentOrBuilder { + private static final long serialVersionUID = 0L; + // Use Comment.newBuilder() to construct. + private Comment(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Comment() { + date_ = ""; + inputs_ = java.util.Collections.emptyList(); + multipliers_ = java.util.Collections.emptyList(); + paints_ = java.util.Collections.emptyList(); + judgmentMeters_ = java.util.Collections.emptyList(); + audioMultipliers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Comment(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_Comment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_Comment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.Comment.class, net.taehui.CommentClass.Comment.Builder.class); + } + + public static final int DATE_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object date_ = ""; + /** + * string date = 1; + * @return The date. + */ + @java.lang.Override + public java.lang.String getDate() { + java.lang.Object ref = date_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + date_ = s; + return s; + } + } + /** + * string date = 1; + * @return The bytes for date. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getDateBytes() { + java.lang.Object ref = date_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + date_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HIGHESTJUDGMENT_FIELD_NUMBER = 2; + private int highestJudgment_ = 0; + /** + * int32 highestJudgment = 2; + * @return The highestJudgment. + */ + @java.lang.Override + public int getHighestJudgment() { + return highestJudgment_; + } + + public static final int HIGHERJUDGMENT_FIELD_NUMBER = 3; + private int higherJudgment_ = 0; + /** + * int32 higherJudgment = 3; + * @return The higherJudgment. + */ + @java.lang.Override + public int getHigherJudgment() { + return higherJudgment_; + } + + public static final int HIGHJUDGMENT_FIELD_NUMBER = 4; + private int highJudgment_ = 0; + /** + * int32 highJudgment = 4; + * @return The highJudgment. + */ + @java.lang.Override + public int getHighJudgment() { + return highJudgment_; + } + + public static final int LOWJUDGMENT_FIELD_NUMBER = 5; + private int lowJudgment_ = 0; + /** + * int32 lowJudgment = 5; + * @return The lowJudgment. + */ + @java.lang.Override + public int getLowJudgment() { + return lowJudgment_; + } + + public static final int LOWERJUDGMENT_FIELD_NUMBER = 6; + private int lowerJudgment_ = 0; + /** + * int32 lowerJudgment = 6; + * @return The lowerJudgment. + */ + @java.lang.Override + public int getLowerJudgment() { + return lowerJudgment_; + } + + public static final int LOWESTJUDGMENT_FIELD_NUMBER = 7; + private int lowestJudgment_ = 0; + /** + * int32 lowestJudgment = 7; + * @return The lowestJudgment. + */ + @java.lang.Override + public int getLowestJudgment() { + return lowestJudgment_; + } + + public static final int INPUTS_FIELD_NUMBER = 8; + @SuppressWarnings("serial") + private java.util.List inputs_; + /** + * repeated .InputEvent inputs = 8; + */ + @java.lang.Override + public java.util.List getInputsList() { + return inputs_; + } + /** + * repeated .InputEvent inputs = 8; + */ + @java.lang.Override + public java.util.List + getInputsOrBuilderList() { + return inputs_; + } + /** + * repeated .InputEvent inputs = 8; + */ + @java.lang.Override + public int getInputsCount() { + return inputs_.size(); + } + /** + * repeated .InputEvent inputs = 8; + */ + @java.lang.Override + public net.taehui.CommentClass.InputEvent getInputs(int index) { + return inputs_.get(index); + } + /** + * repeated .InputEvent inputs = 8; + */ + @java.lang.Override + public net.taehui.CommentClass.InputEventOrBuilder getInputsOrBuilder( + int index) { + return inputs_.get(index); + } + + public static final int MULTIPLIERS_FIELD_NUMBER = 9; + @SuppressWarnings("serial") + private java.util.List multipliers_; + /** + * repeated .MultiplierEvent multipliers = 9; + */ + @java.lang.Override + public java.util.List getMultipliersList() { + return multipliers_; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + @java.lang.Override + public java.util.List + getMultipliersOrBuilderList() { + return multipliers_; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + @java.lang.Override + public int getMultipliersCount() { + return multipliers_.size(); + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + @java.lang.Override + public net.taehui.CommentClass.MultiplierEvent getMultipliers(int index) { + return multipliers_.get(index); + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + @java.lang.Override + public net.taehui.CommentClass.MultiplierEventOrBuilder getMultipliersOrBuilder( + int index) { + return multipliers_.get(index); + } + + public static final int PAINTS_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List paints_; + /** + * repeated .PaintEvent paints = 10; + */ + @java.lang.Override + public java.util.List getPaintsList() { + return paints_; + } + /** + * repeated .PaintEvent paints = 10; + */ + @java.lang.Override + public java.util.List + getPaintsOrBuilderList() { + return paints_; + } + /** + * repeated .PaintEvent paints = 10; + */ + @java.lang.Override + public int getPaintsCount() { + return paints_.size(); + } + /** + * repeated .PaintEvent paints = 10; + */ + @java.lang.Override + public net.taehui.CommentClass.PaintEvent getPaints(int index) { + return paints_.get(index); + } + /** + * repeated .PaintEvent paints = 10; + */ + @java.lang.Override + public net.taehui.CommentClass.PaintEventOrBuilder getPaintsOrBuilder( + int index) { + return paints_.get(index); + } + + public static final int LOOPUNIT_FIELD_NUMBER = 11; + private int loopUnit_ = 0; + /** + * int32 loopUnit = 11; + * @return The loopUnit. + */ + @java.lang.Override + public int getLoopUnit() { + return loopUnit_; + } + + public static final int JUDGMENTMETERS_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List judgmentMeters_; + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + @java.lang.Override + public java.util.List getJudgmentMetersList() { + return judgmentMeters_; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + @java.lang.Override + public java.util.List + getJudgmentMetersOrBuilderList() { + return judgmentMeters_; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + @java.lang.Override + public int getJudgmentMetersCount() { + return judgmentMeters_.size(); + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + @java.lang.Override + public net.taehui.CommentClass.JudgmentMeterEvent getJudgmentMeters(int index) { + return judgmentMeters_.get(index); + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + @java.lang.Override + public net.taehui.CommentClass.JudgmentMeterEventOrBuilder getJudgmentMetersOrBuilder( + int index) { + return judgmentMeters_.get(index); + } + + public static final int AUDIOMULTIPLIERS_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private java.util.List audioMultipliers_; + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + @java.lang.Override + public java.util.List getAudioMultipliersList() { + return audioMultipliers_; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + @java.lang.Override + public java.util.List + getAudioMultipliersOrBuilderList() { + return audioMultipliers_; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + @java.lang.Override + public int getAudioMultipliersCount() { + return audioMultipliers_.size(); + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + @java.lang.Override + public net.taehui.CommentClass.AudioMultiplierEvent getAudioMultipliers(int index) { + return audioMultipliers_.get(index); + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + @java.lang.Override + public net.taehui.CommentClass.AudioMultiplierEventOrBuilder getAudioMultipliersOrBuilder( + int index) { + return audioMultipliers_.get(index); + } + + public static final int LEVYINGMULTIPLIER_FIELD_NUMBER = 14; + private double levyingMultiplier_ = 0D; + /** + * double levyingMultiplier = 14; + * @return The levyingMultiplier. + */ + @java.lang.Override + public double getLevyingMultiplier() { + return levyingMultiplier_; + } + + public static final int LEVYINGAUDIOMULTIPLIER_FIELD_NUMBER = 15; + private double levyingAudioMultiplier_ = 0D; + /** + * double levyingAudioMultiplier = 15; + * @return The levyingAudioMultiplier. + */ + @java.lang.Override + public double getLevyingAudioMultiplier() { + return levyingAudioMultiplier_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(date_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, date_); + } + if (highestJudgment_ != 0) { + output.writeInt32(2, highestJudgment_); + } + if (higherJudgment_ != 0) { + output.writeInt32(3, higherJudgment_); + } + if (highJudgment_ != 0) { + output.writeInt32(4, highJudgment_); + } + if (lowJudgment_ != 0) { + output.writeInt32(5, lowJudgment_); + } + if (lowerJudgment_ != 0) { + output.writeInt32(6, lowerJudgment_); + } + if (lowestJudgment_ != 0) { + output.writeInt32(7, lowestJudgment_); + } + for (int i = 0; i < inputs_.size(); i++) { + output.writeMessage(8, inputs_.get(i)); + } + for (int i = 0; i < multipliers_.size(); i++) { + output.writeMessage(9, multipliers_.get(i)); + } + for (int i = 0; i < paints_.size(); i++) { + output.writeMessage(10, paints_.get(i)); + } + if (loopUnit_ != 0) { + output.writeInt32(11, loopUnit_); + } + for (int i = 0; i < judgmentMeters_.size(); i++) { + output.writeMessage(12, judgmentMeters_.get(i)); + } + for (int i = 0; i < audioMultipliers_.size(); i++) { + output.writeMessage(13, audioMultipliers_.get(i)); + } + if (java.lang.Double.doubleToRawLongBits(levyingMultiplier_) != 0) { + output.writeDouble(14, levyingMultiplier_); + } + if (java.lang.Double.doubleToRawLongBits(levyingAudioMultiplier_) != 0) { + output.writeDouble(15, levyingAudioMultiplier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(date_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, date_); + } + if (highestJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, highestJudgment_); + } + if (higherJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, higherJudgment_); + } + if (highJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, highJudgment_); + } + if (lowJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, lowJudgment_); + } + if (lowerJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, lowerJudgment_); + } + if (lowestJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, lowestJudgment_); + } + for (int i = 0; i < inputs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, inputs_.get(i)); + } + for (int i = 0; i < multipliers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, multipliers_.get(i)); + } + for (int i = 0; i < paints_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, paints_.get(i)); + } + if (loopUnit_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(11, loopUnit_); + } + for (int i = 0; i < judgmentMeters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, judgmentMeters_.get(i)); + } + for (int i = 0; i < audioMultipliers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, audioMultipliers_.get(i)); + } + if (java.lang.Double.doubleToRawLongBits(levyingMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(14, levyingMultiplier_); + } + if (java.lang.Double.doubleToRawLongBits(levyingAudioMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(15, levyingAudioMultiplier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.CommentClass.Comment)) { + return super.equals(obj); + } + net.taehui.CommentClass.Comment other = (net.taehui.CommentClass.Comment) obj; + + if (!getDate() + .equals(other.getDate())) return false; + if (getHighestJudgment() + != other.getHighestJudgment()) return false; + if (getHigherJudgment() + != other.getHigherJudgment()) return false; + if (getHighJudgment() + != other.getHighJudgment()) return false; + if (getLowJudgment() + != other.getLowJudgment()) return false; + if (getLowerJudgment() + != other.getLowerJudgment()) return false; + if (getLowestJudgment() + != other.getLowestJudgment()) return false; + if (!getInputsList() + .equals(other.getInputsList())) return false; + if (!getMultipliersList() + .equals(other.getMultipliersList())) return false; + if (!getPaintsList() + .equals(other.getPaintsList())) return false; + if (getLoopUnit() + != other.getLoopUnit()) return false; + if (!getJudgmentMetersList() + .equals(other.getJudgmentMetersList())) return false; + if (!getAudioMultipliersList() + .equals(other.getAudioMultipliersList())) return false; + if (java.lang.Double.doubleToLongBits(getLevyingMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getLevyingMultiplier())) return false; + if (java.lang.Double.doubleToLongBits(getLevyingAudioMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getLevyingAudioMultiplier())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DATE_FIELD_NUMBER; + hash = (53 * hash) + getDate().hashCode(); + hash = (37 * hash) + HIGHESTJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getHighestJudgment(); + hash = (37 * hash) + HIGHERJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getHigherJudgment(); + hash = (37 * hash) + HIGHJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getHighJudgment(); + hash = (37 * hash) + LOWJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getLowJudgment(); + hash = (37 * hash) + LOWERJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getLowerJudgment(); + hash = (37 * hash) + LOWESTJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getLowestJudgment(); + if (getInputsCount() > 0) { + hash = (37 * hash) + INPUTS_FIELD_NUMBER; + hash = (53 * hash) + getInputsList().hashCode(); + } + if (getMultipliersCount() > 0) { + hash = (37 * hash) + MULTIPLIERS_FIELD_NUMBER; + hash = (53 * hash) + getMultipliersList().hashCode(); + } + if (getPaintsCount() > 0) { + hash = (37 * hash) + PAINTS_FIELD_NUMBER; + hash = (53 * hash) + getPaintsList().hashCode(); + } + hash = (37 * hash) + LOOPUNIT_FIELD_NUMBER; + hash = (53 * hash) + getLoopUnit(); + if (getJudgmentMetersCount() > 0) { + hash = (37 * hash) + JUDGMENTMETERS_FIELD_NUMBER; + hash = (53 * hash) + getJudgmentMetersList().hashCode(); + } + if (getAudioMultipliersCount() > 0) { + hash = (37 * hash) + AUDIOMULTIPLIERS_FIELD_NUMBER; + hash = (53 * hash) + getAudioMultipliersList().hashCode(); + } + hash = (37 * hash) + LEVYINGMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLevyingMultiplier())); + hash = (37 * hash) + LEVYINGAUDIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLevyingAudioMultiplier())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.CommentClass.Comment parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.Comment parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.Comment parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.Comment parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.Comment parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.Comment parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.Comment parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.Comment parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.CommentClass.Comment parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.CommentClass.Comment parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.CommentClass.Comment parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.Comment parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.CommentClass.Comment prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Comment} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Comment) + net.taehui.CommentClass.CommentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_Comment_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_Comment_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.Comment.class, net.taehui.CommentClass.Comment.Builder.class); + } + + // Construct using net.taehui.CommentClass.Comment.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + date_ = ""; + highestJudgment_ = 0; + higherJudgment_ = 0; + highJudgment_ = 0; + lowJudgment_ = 0; + lowerJudgment_ = 0; + lowestJudgment_ = 0; + if (inputsBuilder_ == null) { + inputs_ = java.util.Collections.emptyList(); + } else { + inputs_ = null; + inputsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000080); + if (multipliersBuilder_ == null) { + multipliers_ = java.util.Collections.emptyList(); + } else { + multipliers_ = null; + multipliersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000100); + if (paintsBuilder_ == null) { + paints_ = java.util.Collections.emptyList(); + } else { + paints_ = null; + paintsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + loopUnit_ = 0; + if (judgmentMetersBuilder_ == null) { + judgmentMeters_ = java.util.Collections.emptyList(); + } else { + judgmentMeters_ = null; + judgmentMetersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + if (audioMultipliersBuilder_ == null) { + audioMultipliers_ = java.util.Collections.emptyList(); + } else { + audioMultipliers_ = null; + audioMultipliersBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00001000); + levyingMultiplier_ = 0D; + levyingAudioMultiplier_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.CommentClass.internal_static_Comment_descriptor; + } + + @java.lang.Override + public net.taehui.CommentClass.Comment getDefaultInstanceForType() { + return net.taehui.CommentClass.Comment.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.CommentClass.Comment build() { + net.taehui.CommentClass.Comment result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.CommentClass.Comment buildPartial() { + net.taehui.CommentClass.Comment result = new net.taehui.CommentClass.Comment(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(net.taehui.CommentClass.Comment result) { + if (inputsBuilder_ == null) { + if (((bitField0_ & 0x00000080) != 0)) { + inputs_ = java.util.Collections.unmodifiableList(inputs_); + bitField0_ = (bitField0_ & ~0x00000080); + } + result.inputs_ = inputs_; + } else { + result.inputs_ = inputsBuilder_.build(); + } + if (multipliersBuilder_ == null) { + if (((bitField0_ & 0x00000100) != 0)) { + multipliers_ = java.util.Collections.unmodifiableList(multipliers_); + bitField0_ = (bitField0_ & ~0x00000100); + } + result.multipliers_ = multipliers_; + } else { + result.multipliers_ = multipliersBuilder_.build(); + } + if (paintsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + paints_ = java.util.Collections.unmodifiableList(paints_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.paints_ = paints_; + } else { + result.paints_ = paintsBuilder_.build(); + } + if (judgmentMetersBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + judgmentMeters_ = java.util.Collections.unmodifiableList(judgmentMeters_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.judgmentMeters_ = judgmentMeters_; + } else { + result.judgmentMeters_ = judgmentMetersBuilder_.build(); + } + if (audioMultipliersBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0)) { + audioMultipliers_ = java.util.Collections.unmodifiableList(audioMultipliers_); + bitField0_ = (bitField0_ & ~0x00001000); + } + result.audioMultipliers_ = audioMultipliers_; + } else { + result.audioMultipliers_ = audioMultipliersBuilder_.build(); + } + } + + private void buildPartial0(net.taehui.CommentClass.Comment result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.date_ = date_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.highestJudgment_ = highestJudgment_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.higherJudgment_ = higherJudgment_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.highJudgment_ = highJudgment_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.lowJudgment_ = lowJudgment_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.lowerJudgment_ = lowerJudgment_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.lowestJudgment_ = lowestJudgment_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.loopUnit_ = loopUnit_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.levyingMultiplier_ = levyingMultiplier_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.levyingAudioMultiplier_ = levyingAudioMultiplier_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.CommentClass.Comment) { + return mergeFrom((net.taehui.CommentClass.Comment)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.CommentClass.Comment other) { + if (other == net.taehui.CommentClass.Comment.getDefaultInstance()) return this; + if (!other.getDate().isEmpty()) { + date_ = other.date_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getHighestJudgment() != 0) { + setHighestJudgment(other.getHighestJudgment()); + } + if (other.getHigherJudgment() != 0) { + setHigherJudgment(other.getHigherJudgment()); + } + if (other.getHighJudgment() != 0) { + setHighJudgment(other.getHighJudgment()); + } + if (other.getLowJudgment() != 0) { + setLowJudgment(other.getLowJudgment()); + } + if (other.getLowerJudgment() != 0) { + setLowerJudgment(other.getLowerJudgment()); + } + if (other.getLowestJudgment() != 0) { + setLowestJudgment(other.getLowestJudgment()); + } + if (inputsBuilder_ == null) { + if (!other.inputs_.isEmpty()) { + if (inputs_.isEmpty()) { + inputs_ = other.inputs_; + bitField0_ = (bitField0_ & ~0x00000080); + } else { + ensureInputsIsMutable(); + inputs_.addAll(other.inputs_); + } + onChanged(); + } + } else { + if (!other.inputs_.isEmpty()) { + if (inputsBuilder_.isEmpty()) { + inputsBuilder_.dispose(); + inputsBuilder_ = null; + inputs_ = other.inputs_; + bitField0_ = (bitField0_ & ~0x00000080); + inputsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getInputsFieldBuilder() : null; + } else { + inputsBuilder_.addAllMessages(other.inputs_); + } + } + } + if (multipliersBuilder_ == null) { + if (!other.multipliers_.isEmpty()) { + if (multipliers_.isEmpty()) { + multipliers_ = other.multipliers_; + bitField0_ = (bitField0_ & ~0x00000100); + } else { + ensureMultipliersIsMutable(); + multipliers_.addAll(other.multipliers_); + } + onChanged(); + } + } else { + if (!other.multipliers_.isEmpty()) { + if (multipliersBuilder_.isEmpty()) { + multipliersBuilder_.dispose(); + multipliersBuilder_ = null; + multipliers_ = other.multipliers_; + bitField0_ = (bitField0_ & ~0x00000100); + multipliersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getMultipliersFieldBuilder() : null; + } else { + multipliersBuilder_.addAllMessages(other.multipliers_); + } + } + } + if (paintsBuilder_ == null) { + if (!other.paints_.isEmpty()) { + if (paints_.isEmpty()) { + paints_ = other.paints_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensurePaintsIsMutable(); + paints_.addAll(other.paints_); + } + onChanged(); + } + } else { + if (!other.paints_.isEmpty()) { + if (paintsBuilder_.isEmpty()) { + paintsBuilder_.dispose(); + paintsBuilder_ = null; + paints_ = other.paints_; + bitField0_ = (bitField0_ & ~0x00000200); + paintsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getPaintsFieldBuilder() : null; + } else { + paintsBuilder_.addAllMessages(other.paints_); + } + } + } + if (other.getLoopUnit() != 0) { + setLoopUnit(other.getLoopUnit()); + } + if (judgmentMetersBuilder_ == null) { + if (!other.judgmentMeters_.isEmpty()) { + if (judgmentMeters_.isEmpty()) { + judgmentMeters_ = other.judgmentMeters_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureJudgmentMetersIsMutable(); + judgmentMeters_.addAll(other.judgmentMeters_); + } + onChanged(); + } + } else { + if (!other.judgmentMeters_.isEmpty()) { + if (judgmentMetersBuilder_.isEmpty()) { + judgmentMetersBuilder_.dispose(); + judgmentMetersBuilder_ = null; + judgmentMeters_ = other.judgmentMeters_; + bitField0_ = (bitField0_ & ~0x00000800); + judgmentMetersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getJudgmentMetersFieldBuilder() : null; + } else { + judgmentMetersBuilder_.addAllMessages(other.judgmentMeters_); + } + } + } + if (audioMultipliersBuilder_ == null) { + if (!other.audioMultipliers_.isEmpty()) { + if (audioMultipliers_.isEmpty()) { + audioMultipliers_ = other.audioMultipliers_; + bitField0_ = (bitField0_ & ~0x00001000); + } else { + ensureAudioMultipliersIsMutable(); + audioMultipliers_.addAll(other.audioMultipliers_); + } + onChanged(); + } + } else { + if (!other.audioMultipliers_.isEmpty()) { + if (audioMultipliersBuilder_.isEmpty()) { + audioMultipliersBuilder_.dispose(); + audioMultipliersBuilder_ = null; + audioMultipliers_ = other.audioMultipliers_; + bitField0_ = (bitField0_ & ~0x00001000); + audioMultipliersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getAudioMultipliersFieldBuilder() : null; + } else { + audioMultipliersBuilder_.addAllMessages(other.audioMultipliers_); + } + } + } + if (other.getLevyingMultiplier() != 0D) { + setLevyingMultiplier(other.getLevyingMultiplier()); + } + if (other.getLevyingAudioMultiplier() != 0D) { + setLevyingAudioMultiplier(other.getLevyingAudioMultiplier()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + date_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + highestJudgment_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + higherJudgment_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + highJudgment_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + lowJudgment_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 48: { + lowerJudgment_ = input.readInt32(); + bitField0_ |= 0x00000020; + break; + } // case 48 + case 56: { + lowestJudgment_ = input.readInt32(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 66: { + net.taehui.CommentClass.InputEvent m = + input.readMessage( + net.taehui.CommentClass.InputEvent.parser(), + extensionRegistry); + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.add(m); + } else { + inputsBuilder_.addMessage(m); + } + break; + } // case 66 + case 74: { + net.taehui.CommentClass.MultiplierEvent m = + input.readMessage( + net.taehui.CommentClass.MultiplierEvent.parser(), + extensionRegistry); + if (multipliersBuilder_ == null) { + ensureMultipliersIsMutable(); + multipliers_.add(m); + } else { + multipliersBuilder_.addMessage(m); + } + break; + } // case 74 + case 82: { + net.taehui.CommentClass.PaintEvent m = + input.readMessage( + net.taehui.CommentClass.PaintEvent.parser(), + extensionRegistry); + if (paintsBuilder_ == null) { + ensurePaintsIsMutable(); + paints_.add(m); + } else { + paintsBuilder_.addMessage(m); + } + break; + } // case 82 + case 88: { + loopUnit_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: { + net.taehui.CommentClass.JudgmentMeterEvent m = + input.readMessage( + net.taehui.CommentClass.JudgmentMeterEvent.parser(), + extensionRegistry); + if (judgmentMetersBuilder_ == null) { + ensureJudgmentMetersIsMutable(); + judgmentMeters_.add(m); + } else { + judgmentMetersBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + net.taehui.CommentClass.AudioMultiplierEvent m = + input.readMessage( + net.taehui.CommentClass.AudioMultiplierEvent.parser(), + extensionRegistry); + if (audioMultipliersBuilder_ == null) { + ensureAudioMultipliersIsMutable(); + audioMultipliers_.add(m); + } else { + audioMultipliersBuilder_.addMessage(m); + } + break; + } // case 106 + case 113: { + levyingMultiplier_ = input.readDouble(); + bitField0_ |= 0x00002000; + break; + } // case 113 + case 121: { + levyingAudioMultiplier_ = input.readDouble(); + bitField0_ |= 0x00004000; + break; + } // case 121 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object date_ = ""; + /** + * string date = 1; + * @return The date. + */ + public java.lang.String getDate() { + java.lang.Object ref = date_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + date_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string date = 1; + * @return The bytes for date. + */ + public com.google.protobuf.ByteString + getDateBytes() { + java.lang.Object ref = date_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + date_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string date = 1; + * @param value The date to set. + * @return This builder for chaining. + */ + public Builder setDate( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + date_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string date = 1; + * @return This builder for chaining. + */ + public Builder clearDate() { + date_ = getDefaultInstance().getDate(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string date = 1; + * @param value The bytes for date to set. + * @return This builder for chaining. + */ + public Builder setDateBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + date_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int highestJudgment_ ; + /** + * int32 highestJudgment = 2; + * @return The highestJudgment. + */ + @java.lang.Override + public int getHighestJudgment() { + return highestJudgment_; + } + /** + * int32 highestJudgment = 2; + * @param value The highestJudgment to set. + * @return This builder for chaining. + */ + public Builder setHighestJudgment(int value) { + + highestJudgment_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 highestJudgment = 2; + * @return This builder for chaining. + */ + public Builder clearHighestJudgment() { + bitField0_ = (bitField0_ & ~0x00000002); + highestJudgment_ = 0; + onChanged(); + return this; + } + + private int higherJudgment_ ; + /** + * int32 higherJudgment = 3; + * @return The higherJudgment. + */ + @java.lang.Override + public int getHigherJudgment() { + return higherJudgment_; + } + /** + * int32 higherJudgment = 3; + * @param value The higherJudgment to set. + * @return This builder for chaining. + */ + public Builder setHigherJudgment(int value) { + + higherJudgment_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 higherJudgment = 3; + * @return This builder for chaining. + */ + public Builder clearHigherJudgment() { + bitField0_ = (bitField0_ & ~0x00000004); + higherJudgment_ = 0; + onChanged(); + return this; + } + + private int highJudgment_ ; + /** + * int32 highJudgment = 4; + * @return The highJudgment. + */ + @java.lang.Override + public int getHighJudgment() { + return highJudgment_; + } + /** + * int32 highJudgment = 4; + * @param value The highJudgment to set. + * @return This builder for chaining. + */ + public Builder setHighJudgment(int value) { + + highJudgment_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 highJudgment = 4; + * @return This builder for chaining. + */ + public Builder clearHighJudgment() { + bitField0_ = (bitField0_ & ~0x00000008); + highJudgment_ = 0; + onChanged(); + return this; + } + + private int lowJudgment_ ; + /** + * int32 lowJudgment = 5; + * @return The lowJudgment. + */ + @java.lang.Override + public int getLowJudgment() { + return lowJudgment_; + } + /** + * int32 lowJudgment = 5; + * @param value The lowJudgment to set. + * @return This builder for chaining. + */ + public Builder setLowJudgment(int value) { + + lowJudgment_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 lowJudgment = 5; + * @return This builder for chaining. + */ + public Builder clearLowJudgment() { + bitField0_ = (bitField0_ & ~0x00000010); + lowJudgment_ = 0; + onChanged(); + return this; + } + + private int lowerJudgment_ ; + /** + * int32 lowerJudgment = 6; + * @return The lowerJudgment. + */ + @java.lang.Override + public int getLowerJudgment() { + return lowerJudgment_; + } + /** + * int32 lowerJudgment = 6; + * @param value The lowerJudgment to set. + * @return This builder for chaining. + */ + public Builder setLowerJudgment(int value) { + + lowerJudgment_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * int32 lowerJudgment = 6; + * @return This builder for chaining. + */ + public Builder clearLowerJudgment() { + bitField0_ = (bitField0_ & ~0x00000020); + lowerJudgment_ = 0; + onChanged(); + return this; + } + + private int lowestJudgment_ ; + /** + * int32 lowestJudgment = 7; + * @return The lowestJudgment. + */ + @java.lang.Override + public int getLowestJudgment() { + return lowestJudgment_; + } + /** + * int32 lowestJudgment = 7; + * @param value The lowestJudgment to set. + * @return This builder for chaining. + */ + public Builder setLowestJudgment(int value) { + + lowestJudgment_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int32 lowestJudgment = 7; + * @return This builder for chaining. + */ + public Builder clearLowestJudgment() { + bitField0_ = (bitField0_ & ~0x00000040); + lowestJudgment_ = 0; + onChanged(); + return this; + } + + private java.util.List inputs_ = + java.util.Collections.emptyList(); + private void ensureInputsIsMutable() { + if (!((bitField0_ & 0x00000080) != 0)) { + inputs_ = new java.util.ArrayList(inputs_); + bitField0_ |= 0x00000080; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.InputEvent, net.taehui.CommentClass.InputEvent.Builder, net.taehui.CommentClass.InputEventOrBuilder> inputsBuilder_; + + /** + * repeated .InputEvent inputs = 8; + */ + public java.util.List getInputsList() { + if (inputsBuilder_ == null) { + return java.util.Collections.unmodifiableList(inputs_); + } else { + return inputsBuilder_.getMessageList(); + } + } + /** + * repeated .InputEvent inputs = 8; + */ + public int getInputsCount() { + if (inputsBuilder_ == null) { + return inputs_.size(); + } else { + return inputsBuilder_.getCount(); + } + } + /** + * repeated .InputEvent inputs = 8; + */ + public net.taehui.CommentClass.InputEvent getInputs(int index) { + if (inputsBuilder_ == null) { + return inputs_.get(index); + } else { + return inputsBuilder_.getMessage(index); + } + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder setInputs( + int index, net.taehui.CommentClass.InputEvent value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputsIsMutable(); + inputs_.set(index, value); + onChanged(); + } else { + inputsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder setInputs( + int index, net.taehui.CommentClass.InputEvent.Builder builderForValue) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.set(index, builderForValue.build()); + onChanged(); + } else { + inputsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder addInputs(net.taehui.CommentClass.InputEvent value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputsIsMutable(); + inputs_.add(value); + onChanged(); + } else { + inputsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder addInputs( + int index, net.taehui.CommentClass.InputEvent value) { + if (inputsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureInputsIsMutable(); + inputs_.add(index, value); + onChanged(); + } else { + inputsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder addInputs( + net.taehui.CommentClass.InputEvent.Builder builderForValue) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.add(builderForValue.build()); + onChanged(); + } else { + inputsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder addInputs( + int index, net.taehui.CommentClass.InputEvent.Builder builderForValue) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.add(index, builderForValue.build()); + onChanged(); + } else { + inputsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder addAllInputs( + java.lang.Iterable values) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, inputs_); + onChanged(); + } else { + inputsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder clearInputs() { + if (inputsBuilder_ == null) { + inputs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000080); + onChanged(); + } else { + inputsBuilder_.clear(); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public Builder removeInputs(int index) { + if (inputsBuilder_ == null) { + ensureInputsIsMutable(); + inputs_.remove(index); + onChanged(); + } else { + inputsBuilder_.remove(index); + } + return this; + } + /** + * repeated .InputEvent inputs = 8; + */ + public net.taehui.CommentClass.InputEvent.Builder getInputsBuilder( + int index) { + return getInputsFieldBuilder().getBuilder(index); + } + /** + * repeated .InputEvent inputs = 8; + */ + public net.taehui.CommentClass.InputEventOrBuilder getInputsOrBuilder( + int index) { + if (inputsBuilder_ == null) { + return inputs_.get(index); } else { + return inputsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .InputEvent inputs = 8; + */ + public java.util.List + getInputsOrBuilderList() { + if (inputsBuilder_ != null) { + return inputsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(inputs_); + } + } + /** + * repeated .InputEvent inputs = 8; + */ + public net.taehui.CommentClass.InputEvent.Builder addInputsBuilder() { + return getInputsFieldBuilder().addBuilder( + net.taehui.CommentClass.InputEvent.getDefaultInstance()); + } + /** + * repeated .InputEvent inputs = 8; + */ + public net.taehui.CommentClass.InputEvent.Builder addInputsBuilder( + int index) { + return getInputsFieldBuilder().addBuilder( + index, net.taehui.CommentClass.InputEvent.getDefaultInstance()); + } + /** + * repeated .InputEvent inputs = 8; + */ + public java.util.List + getInputsBuilderList() { + return getInputsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.InputEvent, net.taehui.CommentClass.InputEvent.Builder, net.taehui.CommentClass.InputEventOrBuilder> + getInputsFieldBuilder() { + if (inputsBuilder_ == null) { + inputsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.InputEvent, net.taehui.CommentClass.InputEvent.Builder, net.taehui.CommentClass.InputEventOrBuilder>( + inputs_, + ((bitField0_ & 0x00000080) != 0), + getParentForChildren(), + isClean()); + inputs_ = null; + } + return inputsBuilder_; + } + + private java.util.List multipliers_ = + java.util.Collections.emptyList(); + private void ensureMultipliersIsMutable() { + if (!((bitField0_ & 0x00000100) != 0)) { + multipliers_ = new java.util.ArrayList(multipliers_); + bitField0_ |= 0x00000100; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.MultiplierEvent, net.taehui.CommentClass.MultiplierEvent.Builder, net.taehui.CommentClass.MultiplierEventOrBuilder> multipliersBuilder_; + + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public java.util.List getMultipliersList() { + if (multipliersBuilder_ == null) { + return java.util.Collections.unmodifiableList(multipliers_); + } else { + return multipliersBuilder_.getMessageList(); + } + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public int getMultipliersCount() { + if (multipliersBuilder_ == null) { + return multipliers_.size(); + } else { + return multipliersBuilder_.getCount(); + } + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public net.taehui.CommentClass.MultiplierEvent getMultipliers(int index) { + if (multipliersBuilder_ == null) { + return multipliers_.get(index); + } else { + return multipliersBuilder_.getMessage(index); + } + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder setMultipliers( + int index, net.taehui.CommentClass.MultiplierEvent value) { + if (multipliersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultipliersIsMutable(); + multipliers_.set(index, value); + onChanged(); + } else { + multipliersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder setMultipliers( + int index, net.taehui.CommentClass.MultiplierEvent.Builder builderForValue) { + if (multipliersBuilder_ == null) { + ensureMultipliersIsMutable(); + multipliers_.set(index, builderForValue.build()); + onChanged(); + } else { + multipliersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder addMultipliers(net.taehui.CommentClass.MultiplierEvent value) { + if (multipliersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultipliersIsMutable(); + multipliers_.add(value); + onChanged(); + } else { + multipliersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder addMultipliers( + int index, net.taehui.CommentClass.MultiplierEvent value) { + if (multipliersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureMultipliersIsMutable(); + multipliers_.add(index, value); + onChanged(); + } else { + multipliersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder addMultipliers( + net.taehui.CommentClass.MultiplierEvent.Builder builderForValue) { + if (multipliersBuilder_ == null) { + ensureMultipliersIsMutable(); + multipliers_.add(builderForValue.build()); + onChanged(); + } else { + multipliersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder addMultipliers( + int index, net.taehui.CommentClass.MultiplierEvent.Builder builderForValue) { + if (multipliersBuilder_ == null) { + ensureMultipliersIsMutable(); + multipliers_.add(index, builderForValue.build()); + onChanged(); + } else { + multipliersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder addAllMultipliers( + java.lang.Iterable values) { + if (multipliersBuilder_ == null) { + ensureMultipliersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, multipliers_); + onChanged(); + } else { + multipliersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder clearMultipliers() { + if (multipliersBuilder_ == null) { + multipliers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000100); + onChanged(); + } else { + multipliersBuilder_.clear(); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public Builder removeMultipliers(int index) { + if (multipliersBuilder_ == null) { + ensureMultipliersIsMutable(); + multipliers_.remove(index); + onChanged(); + } else { + multipliersBuilder_.remove(index); + } + return this; + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public net.taehui.CommentClass.MultiplierEvent.Builder getMultipliersBuilder( + int index) { + return getMultipliersFieldBuilder().getBuilder(index); + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public net.taehui.CommentClass.MultiplierEventOrBuilder getMultipliersOrBuilder( + int index) { + if (multipliersBuilder_ == null) { + return multipliers_.get(index); } else { + return multipliersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public java.util.List + getMultipliersOrBuilderList() { + if (multipliersBuilder_ != null) { + return multipliersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(multipliers_); + } + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public net.taehui.CommentClass.MultiplierEvent.Builder addMultipliersBuilder() { + return getMultipliersFieldBuilder().addBuilder( + net.taehui.CommentClass.MultiplierEvent.getDefaultInstance()); + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public net.taehui.CommentClass.MultiplierEvent.Builder addMultipliersBuilder( + int index) { + return getMultipliersFieldBuilder().addBuilder( + index, net.taehui.CommentClass.MultiplierEvent.getDefaultInstance()); + } + /** + * repeated .MultiplierEvent multipliers = 9; + */ + public java.util.List + getMultipliersBuilderList() { + return getMultipliersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.MultiplierEvent, net.taehui.CommentClass.MultiplierEvent.Builder, net.taehui.CommentClass.MultiplierEventOrBuilder> + getMultipliersFieldBuilder() { + if (multipliersBuilder_ == null) { + multipliersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.MultiplierEvent, net.taehui.CommentClass.MultiplierEvent.Builder, net.taehui.CommentClass.MultiplierEventOrBuilder>( + multipliers_, + ((bitField0_ & 0x00000100) != 0), + getParentForChildren(), + isClean()); + multipliers_ = null; + } + return multipliersBuilder_; + } + + private java.util.List paints_ = + java.util.Collections.emptyList(); + private void ensurePaintsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + paints_ = new java.util.ArrayList(paints_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.PaintEvent, net.taehui.CommentClass.PaintEvent.Builder, net.taehui.CommentClass.PaintEventOrBuilder> paintsBuilder_; + + /** + * repeated .PaintEvent paints = 10; + */ + public java.util.List getPaintsList() { + if (paintsBuilder_ == null) { + return java.util.Collections.unmodifiableList(paints_); + } else { + return paintsBuilder_.getMessageList(); + } + } + /** + * repeated .PaintEvent paints = 10; + */ + public int getPaintsCount() { + if (paintsBuilder_ == null) { + return paints_.size(); + } else { + return paintsBuilder_.getCount(); + } + } + /** + * repeated .PaintEvent paints = 10; + */ + public net.taehui.CommentClass.PaintEvent getPaints(int index) { + if (paintsBuilder_ == null) { + return paints_.get(index); + } else { + return paintsBuilder_.getMessage(index); + } + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder setPaints( + int index, net.taehui.CommentClass.PaintEvent value) { + if (paintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePaintsIsMutable(); + paints_.set(index, value); + onChanged(); + } else { + paintsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder setPaints( + int index, net.taehui.CommentClass.PaintEvent.Builder builderForValue) { + if (paintsBuilder_ == null) { + ensurePaintsIsMutable(); + paints_.set(index, builderForValue.build()); + onChanged(); + } else { + paintsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder addPaints(net.taehui.CommentClass.PaintEvent value) { + if (paintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePaintsIsMutable(); + paints_.add(value); + onChanged(); + } else { + paintsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder addPaints( + int index, net.taehui.CommentClass.PaintEvent value) { + if (paintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePaintsIsMutable(); + paints_.add(index, value); + onChanged(); + } else { + paintsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder addPaints( + net.taehui.CommentClass.PaintEvent.Builder builderForValue) { + if (paintsBuilder_ == null) { + ensurePaintsIsMutable(); + paints_.add(builderForValue.build()); + onChanged(); + } else { + paintsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder addPaints( + int index, net.taehui.CommentClass.PaintEvent.Builder builderForValue) { + if (paintsBuilder_ == null) { + ensurePaintsIsMutable(); + paints_.add(index, builderForValue.build()); + onChanged(); + } else { + paintsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder addAllPaints( + java.lang.Iterable values) { + if (paintsBuilder_ == null) { + ensurePaintsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, paints_); + onChanged(); + } else { + paintsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder clearPaints() { + if (paintsBuilder_ == null) { + paints_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + paintsBuilder_.clear(); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public Builder removePaints(int index) { + if (paintsBuilder_ == null) { + ensurePaintsIsMutable(); + paints_.remove(index); + onChanged(); + } else { + paintsBuilder_.remove(index); + } + return this; + } + /** + * repeated .PaintEvent paints = 10; + */ + public net.taehui.CommentClass.PaintEvent.Builder getPaintsBuilder( + int index) { + return getPaintsFieldBuilder().getBuilder(index); + } + /** + * repeated .PaintEvent paints = 10; + */ + public net.taehui.CommentClass.PaintEventOrBuilder getPaintsOrBuilder( + int index) { + if (paintsBuilder_ == null) { + return paints_.get(index); } else { + return paintsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .PaintEvent paints = 10; + */ + public java.util.List + getPaintsOrBuilderList() { + if (paintsBuilder_ != null) { + return paintsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(paints_); + } + } + /** + * repeated .PaintEvent paints = 10; + */ + public net.taehui.CommentClass.PaintEvent.Builder addPaintsBuilder() { + return getPaintsFieldBuilder().addBuilder( + net.taehui.CommentClass.PaintEvent.getDefaultInstance()); + } + /** + * repeated .PaintEvent paints = 10; + */ + public net.taehui.CommentClass.PaintEvent.Builder addPaintsBuilder( + int index) { + return getPaintsFieldBuilder().addBuilder( + index, net.taehui.CommentClass.PaintEvent.getDefaultInstance()); + } + /** + * repeated .PaintEvent paints = 10; + */ + public java.util.List + getPaintsBuilderList() { + return getPaintsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.PaintEvent, net.taehui.CommentClass.PaintEvent.Builder, net.taehui.CommentClass.PaintEventOrBuilder> + getPaintsFieldBuilder() { + if (paintsBuilder_ == null) { + paintsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.PaintEvent, net.taehui.CommentClass.PaintEvent.Builder, net.taehui.CommentClass.PaintEventOrBuilder>( + paints_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + paints_ = null; + } + return paintsBuilder_; + } + + private int loopUnit_ ; + /** + * int32 loopUnit = 11; + * @return The loopUnit. + */ + @java.lang.Override + public int getLoopUnit() { + return loopUnit_; + } + /** + * int32 loopUnit = 11; + * @param value The loopUnit to set. + * @return This builder for chaining. + */ + public Builder setLoopUnit(int value) { + + loopUnit_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * int32 loopUnit = 11; + * @return This builder for chaining. + */ + public Builder clearLoopUnit() { + bitField0_ = (bitField0_ & ~0x00000400); + loopUnit_ = 0; + onChanged(); + return this; + } + + private java.util.List judgmentMeters_ = + java.util.Collections.emptyList(); + private void ensureJudgmentMetersIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + judgmentMeters_ = new java.util.ArrayList(judgmentMeters_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.JudgmentMeterEvent, net.taehui.CommentClass.JudgmentMeterEvent.Builder, net.taehui.CommentClass.JudgmentMeterEventOrBuilder> judgmentMetersBuilder_; + + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public java.util.List getJudgmentMetersList() { + if (judgmentMetersBuilder_ == null) { + return java.util.Collections.unmodifiableList(judgmentMeters_); + } else { + return judgmentMetersBuilder_.getMessageList(); + } + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public int getJudgmentMetersCount() { + if (judgmentMetersBuilder_ == null) { + return judgmentMeters_.size(); + } else { + return judgmentMetersBuilder_.getCount(); + } + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public net.taehui.CommentClass.JudgmentMeterEvent getJudgmentMeters(int index) { + if (judgmentMetersBuilder_ == null) { + return judgmentMeters_.get(index); + } else { + return judgmentMetersBuilder_.getMessage(index); + } + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder setJudgmentMeters( + int index, net.taehui.CommentClass.JudgmentMeterEvent value) { + if (judgmentMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJudgmentMetersIsMutable(); + judgmentMeters_.set(index, value); + onChanged(); + } else { + judgmentMetersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder setJudgmentMeters( + int index, net.taehui.CommentClass.JudgmentMeterEvent.Builder builderForValue) { + if (judgmentMetersBuilder_ == null) { + ensureJudgmentMetersIsMutable(); + judgmentMeters_.set(index, builderForValue.build()); + onChanged(); + } else { + judgmentMetersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder addJudgmentMeters(net.taehui.CommentClass.JudgmentMeterEvent value) { + if (judgmentMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJudgmentMetersIsMutable(); + judgmentMeters_.add(value); + onChanged(); + } else { + judgmentMetersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder addJudgmentMeters( + int index, net.taehui.CommentClass.JudgmentMeterEvent value) { + if (judgmentMetersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureJudgmentMetersIsMutable(); + judgmentMeters_.add(index, value); + onChanged(); + } else { + judgmentMetersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder addJudgmentMeters( + net.taehui.CommentClass.JudgmentMeterEvent.Builder builderForValue) { + if (judgmentMetersBuilder_ == null) { + ensureJudgmentMetersIsMutable(); + judgmentMeters_.add(builderForValue.build()); + onChanged(); + } else { + judgmentMetersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder addJudgmentMeters( + int index, net.taehui.CommentClass.JudgmentMeterEvent.Builder builderForValue) { + if (judgmentMetersBuilder_ == null) { + ensureJudgmentMetersIsMutable(); + judgmentMeters_.add(index, builderForValue.build()); + onChanged(); + } else { + judgmentMetersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder addAllJudgmentMeters( + java.lang.Iterable values) { + if (judgmentMetersBuilder_ == null) { + ensureJudgmentMetersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, judgmentMeters_); + onChanged(); + } else { + judgmentMetersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder clearJudgmentMeters() { + if (judgmentMetersBuilder_ == null) { + judgmentMeters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + judgmentMetersBuilder_.clear(); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public Builder removeJudgmentMeters(int index) { + if (judgmentMetersBuilder_ == null) { + ensureJudgmentMetersIsMutable(); + judgmentMeters_.remove(index); + onChanged(); + } else { + judgmentMetersBuilder_.remove(index); + } + return this; + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public net.taehui.CommentClass.JudgmentMeterEvent.Builder getJudgmentMetersBuilder( + int index) { + return getJudgmentMetersFieldBuilder().getBuilder(index); + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public net.taehui.CommentClass.JudgmentMeterEventOrBuilder getJudgmentMetersOrBuilder( + int index) { + if (judgmentMetersBuilder_ == null) { + return judgmentMeters_.get(index); } else { + return judgmentMetersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public java.util.List + getJudgmentMetersOrBuilderList() { + if (judgmentMetersBuilder_ != null) { + return judgmentMetersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(judgmentMeters_); + } + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public net.taehui.CommentClass.JudgmentMeterEvent.Builder addJudgmentMetersBuilder() { + return getJudgmentMetersFieldBuilder().addBuilder( + net.taehui.CommentClass.JudgmentMeterEvent.getDefaultInstance()); + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public net.taehui.CommentClass.JudgmentMeterEvent.Builder addJudgmentMetersBuilder( + int index) { + return getJudgmentMetersFieldBuilder().addBuilder( + index, net.taehui.CommentClass.JudgmentMeterEvent.getDefaultInstance()); + } + /** + * repeated .JudgmentMeterEvent judgmentMeters = 12; + */ + public java.util.List + getJudgmentMetersBuilderList() { + return getJudgmentMetersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.JudgmentMeterEvent, net.taehui.CommentClass.JudgmentMeterEvent.Builder, net.taehui.CommentClass.JudgmentMeterEventOrBuilder> + getJudgmentMetersFieldBuilder() { + if (judgmentMetersBuilder_ == null) { + judgmentMetersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.JudgmentMeterEvent, net.taehui.CommentClass.JudgmentMeterEvent.Builder, net.taehui.CommentClass.JudgmentMeterEventOrBuilder>( + judgmentMeters_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + judgmentMeters_ = null; + } + return judgmentMetersBuilder_; + } + + private java.util.List audioMultipliers_ = + java.util.Collections.emptyList(); + private void ensureAudioMultipliersIsMutable() { + if (!((bitField0_ & 0x00001000) != 0)) { + audioMultipliers_ = new java.util.ArrayList(audioMultipliers_); + bitField0_ |= 0x00001000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.AudioMultiplierEvent, net.taehui.CommentClass.AudioMultiplierEvent.Builder, net.taehui.CommentClass.AudioMultiplierEventOrBuilder> audioMultipliersBuilder_; + + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public java.util.List getAudioMultipliersList() { + if (audioMultipliersBuilder_ == null) { + return java.util.Collections.unmodifiableList(audioMultipliers_); + } else { + return audioMultipliersBuilder_.getMessageList(); + } + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public int getAudioMultipliersCount() { + if (audioMultipliersBuilder_ == null) { + return audioMultipliers_.size(); + } else { + return audioMultipliersBuilder_.getCount(); + } + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public net.taehui.CommentClass.AudioMultiplierEvent getAudioMultipliers(int index) { + if (audioMultipliersBuilder_ == null) { + return audioMultipliers_.get(index); + } else { + return audioMultipliersBuilder_.getMessage(index); + } + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder setAudioMultipliers( + int index, net.taehui.CommentClass.AudioMultiplierEvent value) { + if (audioMultipliersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAudioMultipliersIsMutable(); + audioMultipliers_.set(index, value); + onChanged(); + } else { + audioMultipliersBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder setAudioMultipliers( + int index, net.taehui.CommentClass.AudioMultiplierEvent.Builder builderForValue) { + if (audioMultipliersBuilder_ == null) { + ensureAudioMultipliersIsMutable(); + audioMultipliers_.set(index, builderForValue.build()); + onChanged(); + } else { + audioMultipliersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder addAudioMultipliers(net.taehui.CommentClass.AudioMultiplierEvent value) { + if (audioMultipliersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAudioMultipliersIsMutable(); + audioMultipliers_.add(value); + onChanged(); + } else { + audioMultipliersBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder addAudioMultipliers( + int index, net.taehui.CommentClass.AudioMultiplierEvent value) { + if (audioMultipliersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAudioMultipliersIsMutable(); + audioMultipliers_.add(index, value); + onChanged(); + } else { + audioMultipliersBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder addAudioMultipliers( + net.taehui.CommentClass.AudioMultiplierEvent.Builder builderForValue) { + if (audioMultipliersBuilder_ == null) { + ensureAudioMultipliersIsMutable(); + audioMultipliers_.add(builderForValue.build()); + onChanged(); + } else { + audioMultipliersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder addAudioMultipliers( + int index, net.taehui.CommentClass.AudioMultiplierEvent.Builder builderForValue) { + if (audioMultipliersBuilder_ == null) { + ensureAudioMultipliersIsMutable(); + audioMultipliers_.add(index, builderForValue.build()); + onChanged(); + } else { + audioMultipliersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder addAllAudioMultipliers( + java.lang.Iterable values) { + if (audioMultipliersBuilder_ == null) { + ensureAudioMultipliersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, audioMultipliers_); + onChanged(); + } else { + audioMultipliersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder clearAudioMultipliers() { + if (audioMultipliersBuilder_ == null) { + audioMultipliers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + } else { + audioMultipliersBuilder_.clear(); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public Builder removeAudioMultipliers(int index) { + if (audioMultipliersBuilder_ == null) { + ensureAudioMultipliersIsMutable(); + audioMultipliers_.remove(index); + onChanged(); + } else { + audioMultipliersBuilder_.remove(index); + } + return this; + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public net.taehui.CommentClass.AudioMultiplierEvent.Builder getAudioMultipliersBuilder( + int index) { + return getAudioMultipliersFieldBuilder().getBuilder(index); + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public net.taehui.CommentClass.AudioMultiplierEventOrBuilder getAudioMultipliersOrBuilder( + int index) { + if (audioMultipliersBuilder_ == null) { + return audioMultipliers_.get(index); } else { + return audioMultipliersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public java.util.List + getAudioMultipliersOrBuilderList() { + if (audioMultipliersBuilder_ != null) { + return audioMultipliersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(audioMultipliers_); + } + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public net.taehui.CommentClass.AudioMultiplierEvent.Builder addAudioMultipliersBuilder() { + return getAudioMultipliersFieldBuilder().addBuilder( + net.taehui.CommentClass.AudioMultiplierEvent.getDefaultInstance()); + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public net.taehui.CommentClass.AudioMultiplierEvent.Builder addAudioMultipliersBuilder( + int index) { + return getAudioMultipliersFieldBuilder().addBuilder( + index, net.taehui.CommentClass.AudioMultiplierEvent.getDefaultInstance()); + } + /** + * repeated .AudioMultiplierEvent audioMultipliers = 13; + */ + public java.util.List + getAudioMultipliersBuilderList() { + return getAudioMultipliersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.AudioMultiplierEvent, net.taehui.CommentClass.AudioMultiplierEvent.Builder, net.taehui.CommentClass.AudioMultiplierEventOrBuilder> + getAudioMultipliersFieldBuilder() { + if (audioMultipliersBuilder_ == null) { + audioMultipliersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.CommentClass.AudioMultiplierEvent, net.taehui.CommentClass.AudioMultiplierEvent.Builder, net.taehui.CommentClass.AudioMultiplierEventOrBuilder>( + audioMultipliers_, + ((bitField0_ & 0x00001000) != 0), + getParentForChildren(), + isClean()); + audioMultipliers_ = null; + } + return audioMultipliersBuilder_; + } + + private double levyingMultiplier_ ; + /** + * double levyingMultiplier = 14; + * @return The levyingMultiplier. + */ + @java.lang.Override + public double getLevyingMultiplier() { + return levyingMultiplier_; + } + /** + * double levyingMultiplier = 14; + * @param value The levyingMultiplier to set. + * @return This builder for chaining. + */ + public Builder setLevyingMultiplier(double value) { + + levyingMultiplier_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * double levyingMultiplier = 14; + * @return This builder for chaining. + */ + public Builder clearLevyingMultiplier() { + bitField0_ = (bitField0_ & ~0x00002000); + levyingMultiplier_ = 0D; + onChanged(); + return this; + } + + private double levyingAudioMultiplier_ ; + /** + * double levyingAudioMultiplier = 15; + * @return The levyingAudioMultiplier. + */ + @java.lang.Override + public double getLevyingAudioMultiplier() { + return levyingAudioMultiplier_; + } + /** + * double levyingAudioMultiplier = 15; + * @param value The levyingAudioMultiplier to set. + * @return This builder for chaining. + */ + public Builder setLevyingAudioMultiplier(double value) { + + levyingAudioMultiplier_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * double levyingAudioMultiplier = 15; + * @return This builder for chaining. + */ + public Builder clearLevyingAudioMultiplier() { + bitField0_ = (bitField0_ & ~0x00004000); + levyingAudioMultiplier_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Comment) + } + + // @@protoc_insertion_point(class_scope:Comment) + private static final net.taehui.CommentClass.Comment DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.CommentClass.Comment(); + } + + public static net.taehui.CommentClass.Comment getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Comment parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.CommentClass.Comment getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface InputEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:InputEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * int32 input = 1; + * @return The input. + */ + int getInput(); + + /** + * double wait = 2; + * @return The wait. + */ + double getWait(); + + /** + * int32 noteID = 3; + * @return The noteID. + */ + int getNoteID(); + + /** + * int32 judged = 4; + * @return The judged. + */ + int getJudged(); + } + /** + * Protobuf type {@code InputEvent} + */ + public static final class InputEvent extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:InputEvent) + InputEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use InputEvent.newBuilder() to construct. + private InputEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private InputEvent() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new InputEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_InputEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_InputEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.InputEvent.class, net.taehui.CommentClass.InputEvent.Builder.class); + } + + public static final int INPUT_FIELD_NUMBER = 1; + private int input_ = 0; + /** + * int32 input = 1; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + + public static final int WAIT_FIELD_NUMBER = 2; + private double wait_ = 0D; + /** + * double wait = 2; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + + public static final int NOTEID_FIELD_NUMBER = 3; + private int noteID_ = 0; + /** + * int32 noteID = 3; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + + public static final int JUDGED_FIELD_NUMBER = 4; + private int judged_ = 0; + /** + * int32 judged = 4; + * @return The judged. + */ + @java.lang.Override + public int getJudged() { + return judged_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (input_ != 0) { + output.writeInt32(1, input_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + output.writeDouble(2, wait_); + } + if (noteID_ != 0) { + output.writeInt32(3, noteID_); + } + if (judged_ != 0) { + output.writeInt32(4, judged_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (input_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, input_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, wait_); + } + if (noteID_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, noteID_); + } + if (judged_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, judged_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.CommentClass.InputEvent)) { + return super.equals(obj); + } + net.taehui.CommentClass.InputEvent other = (net.taehui.CommentClass.InputEvent) obj; + + if (getInput() + != other.getInput()) return false; + if (java.lang.Double.doubleToLongBits(getWait()) + != java.lang.Double.doubleToLongBits( + other.getWait())) return false; + if (getNoteID() + != other.getNoteID()) return false; + if (getJudged() + != other.getJudged()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput(); + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWait())); + hash = (37 * hash) + NOTEID_FIELD_NUMBER; + hash = (53 * hash) + getNoteID(); + hash = (37 * hash) + JUDGED_FIELD_NUMBER; + hash = (53 * hash) + getJudged(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.CommentClass.InputEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.InputEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.InputEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.InputEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.InputEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.InputEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.InputEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.InputEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.CommentClass.InputEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.CommentClass.InputEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.CommentClass.InputEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.InputEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.CommentClass.InputEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code InputEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:InputEvent) + net.taehui.CommentClass.InputEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_InputEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_InputEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.InputEvent.class, net.taehui.CommentClass.InputEvent.Builder.class); + } + + // Construct using net.taehui.CommentClass.InputEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + input_ = 0; + wait_ = 0D; + noteID_ = 0; + judged_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.CommentClass.internal_static_InputEvent_descriptor; + } + + @java.lang.Override + public net.taehui.CommentClass.InputEvent getDefaultInstanceForType() { + return net.taehui.CommentClass.InputEvent.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.CommentClass.InputEvent build() { + net.taehui.CommentClass.InputEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.CommentClass.InputEvent buildPartial() { + net.taehui.CommentClass.InputEvent result = new net.taehui.CommentClass.InputEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.CommentClass.InputEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.input_ = input_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = wait_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.noteID_ = noteID_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.judged_ = judged_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.CommentClass.InputEvent) { + return mergeFrom((net.taehui.CommentClass.InputEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.CommentClass.InputEvent other) { + if (other == net.taehui.CommentClass.InputEvent.getDefaultInstance()) return this; + if (other.getInput() != 0) { + setInput(other.getInput()); + } + if (other.getWait() != 0D) { + setWait(other.getWait()); + } + if (other.getNoteID() != 0) { + setNoteID(other.getNoteID()); + } + if (other.getJudged() != 0) { + setJudged(other.getJudged()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + input_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 17: { + wait_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 24: { + noteID_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + judged_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int input_ ; + /** + * int32 input = 1; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + /** + * int32 input = 1; + * @param value The input to set. + * @return This builder for chaining. + */ + public Builder setInput(int value) { + + input_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int32 input = 1; + * @return This builder for chaining. + */ + public Builder clearInput() { + bitField0_ = (bitField0_ & ~0x00000001); + input_ = 0; + onChanged(); + return this; + } + + private double wait_ ; + /** + * double wait = 2; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + /** + * double wait = 2; + * @param value The wait to set. + * @return This builder for chaining. + */ + public Builder setWait(double value) { + + wait_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * double wait = 2; + * @return This builder for chaining. + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = 0D; + onChanged(); + return this; + } + + private int noteID_ ; + /** + * int32 noteID = 3; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + /** + * int32 noteID = 3; + * @param value The noteID to set. + * @return This builder for chaining. + */ + public Builder setNoteID(int value) { + + noteID_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 noteID = 3; + * @return This builder for chaining. + */ + public Builder clearNoteID() { + bitField0_ = (bitField0_ & ~0x00000004); + noteID_ = 0; + onChanged(); + return this; + } + + private int judged_ ; + /** + * int32 judged = 4; + * @return The judged. + */ + @java.lang.Override + public int getJudged() { + return judged_; + } + /** + * int32 judged = 4; + * @param value The judged to set. + * @return This builder for chaining. + */ + public Builder setJudged(int value) { + + judged_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 judged = 4; + * @return This builder for chaining. + */ + public Builder clearJudged() { + bitField0_ = (bitField0_ & ~0x00000008); + judged_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:InputEvent) + } + + // @@protoc_insertion_point(class_scope:InputEvent) + private static final net.taehui.CommentClass.InputEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.CommentClass.InputEvent(); + } + + public static net.taehui.CommentClass.InputEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public InputEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.CommentClass.InputEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface MultiplierEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:MultiplierEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * double multiplier = 1; + * @return The multiplier. + */ + double getMultiplier(); + + /** + * double wait = 2; + * @return The wait. + */ + double getWait(); + + /** + * bool isAutoEvent = 3; + * @return The isAutoEvent. + */ + boolean getIsAutoEvent(); + } + /** + * Protobuf type {@code MultiplierEvent} + */ + public static final class MultiplierEvent extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:MultiplierEvent) + MultiplierEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use MultiplierEvent.newBuilder() to construct. + private MultiplierEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MultiplierEvent() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new MultiplierEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_MultiplierEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_MultiplierEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.MultiplierEvent.class, net.taehui.CommentClass.MultiplierEvent.Builder.class); + } + + public static final int MULTIPLIER_FIELD_NUMBER = 1; + private double multiplier_ = 0D; + /** + * double multiplier = 1; + * @return The multiplier. + */ + @java.lang.Override + public double getMultiplier() { + return multiplier_; + } + + public static final int WAIT_FIELD_NUMBER = 2; + private double wait_ = 0D; + /** + * double wait = 2; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + + public static final int ISAUTOEVENT_FIELD_NUMBER = 3; + private boolean isAutoEvent_ = false; + /** + * bool isAutoEvent = 3; + * @return The isAutoEvent. + */ + @java.lang.Override + public boolean getIsAutoEvent() { + return isAutoEvent_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(multiplier_) != 0) { + output.writeDouble(1, multiplier_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + output.writeDouble(2, wait_); + } + if (isAutoEvent_ != false) { + output.writeBool(3, isAutoEvent_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(multiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, multiplier_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, wait_); + } + if (isAutoEvent_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, isAutoEvent_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.CommentClass.MultiplierEvent)) { + return super.equals(obj); + } + net.taehui.CommentClass.MultiplierEvent other = (net.taehui.CommentClass.MultiplierEvent) obj; + + if (java.lang.Double.doubleToLongBits(getMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getMultiplier())) return false; + if (java.lang.Double.doubleToLongBits(getWait()) + != java.lang.Double.doubleToLongBits( + other.getWait())) return false; + if (getIsAutoEvent() + != other.getIsAutoEvent()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMultiplier())); + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWait())); + hash = (37 * hash) + ISAUTOEVENT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsAutoEvent()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.CommentClass.MultiplierEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.CommentClass.MultiplierEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.CommentClass.MultiplierEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.MultiplierEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.CommentClass.MultiplierEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code MultiplierEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:MultiplierEvent) + net.taehui.CommentClass.MultiplierEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_MultiplierEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_MultiplierEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.MultiplierEvent.class, net.taehui.CommentClass.MultiplierEvent.Builder.class); + } + + // Construct using net.taehui.CommentClass.MultiplierEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + multiplier_ = 0D; + wait_ = 0D; + isAutoEvent_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.CommentClass.internal_static_MultiplierEvent_descriptor; + } + + @java.lang.Override + public net.taehui.CommentClass.MultiplierEvent getDefaultInstanceForType() { + return net.taehui.CommentClass.MultiplierEvent.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.CommentClass.MultiplierEvent build() { + net.taehui.CommentClass.MultiplierEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.CommentClass.MultiplierEvent buildPartial() { + net.taehui.CommentClass.MultiplierEvent result = new net.taehui.CommentClass.MultiplierEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.CommentClass.MultiplierEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.multiplier_ = multiplier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = wait_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.isAutoEvent_ = isAutoEvent_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.CommentClass.MultiplierEvent) { + return mergeFrom((net.taehui.CommentClass.MultiplierEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.CommentClass.MultiplierEvent other) { + if (other == net.taehui.CommentClass.MultiplierEvent.getDefaultInstance()) return this; + if (other.getMultiplier() != 0D) { + setMultiplier(other.getMultiplier()); + } + if (other.getWait() != 0D) { + setWait(other.getWait()); + } + if (other.getIsAutoEvent() != false) { + setIsAutoEvent(other.getIsAutoEvent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + multiplier_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: { + wait_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 24: { + isAutoEvent_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private double multiplier_ ; + /** + * double multiplier = 1; + * @return The multiplier. + */ + @java.lang.Override + public double getMultiplier() { + return multiplier_; + } + /** + * double multiplier = 1; + * @param value The multiplier to set. + * @return This builder for chaining. + */ + public Builder setMultiplier(double value) { + + multiplier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * double multiplier = 1; + * @return This builder for chaining. + */ + public Builder clearMultiplier() { + bitField0_ = (bitField0_ & ~0x00000001); + multiplier_ = 0D; + onChanged(); + return this; + } + + private double wait_ ; + /** + * double wait = 2; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + /** + * double wait = 2; + * @param value The wait to set. + * @return This builder for chaining. + */ + public Builder setWait(double value) { + + wait_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * double wait = 2; + * @return This builder for chaining. + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = 0D; + onChanged(); + return this; + } + + private boolean isAutoEvent_ ; + /** + * bool isAutoEvent = 3; + * @return The isAutoEvent. + */ + @java.lang.Override + public boolean getIsAutoEvent() { + return isAutoEvent_; + } + /** + * bool isAutoEvent = 3; + * @param value The isAutoEvent to set. + * @return This builder for chaining. + */ + public Builder setIsAutoEvent(boolean value) { + + isAutoEvent_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool isAutoEvent = 3; + * @return This builder for chaining. + */ + public Builder clearIsAutoEvent() { + bitField0_ = (bitField0_ & ~0x00000004); + isAutoEvent_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:MultiplierEvent) + } + + // @@protoc_insertion_point(class_scope:MultiplierEvent) + private static final net.taehui.CommentClass.MultiplierEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.CommentClass.MultiplierEvent(); + } + + public static net.taehui.CommentClass.MultiplierEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MultiplierEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.CommentClass.MultiplierEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface JudgmentMeterEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:JudgmentMeterEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * double judgmentMeter = 1; + * @return The judgmentMeter. + */ + double getJudgmentMeter(); + + /** + * double wait = 2; + * @return The wait. + */ + double getWait(); + + /** + * int32 assist = 3; + * @return The assist. + */ + int getAssist(); + } + /** + * Protobuf type {@code JudgmentMeterEvent} + */ + public static final class JudgmentMeterEvent extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:JudgmentMeterEvent) + JudgmentMeterEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use JudgmentMeterEvent.newBuilder() to construct. + private JudgmentMeterEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private JudgmentMeterEvent() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new JudgmentMeterEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_JudgmentMeterEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_JudgmentMeterEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.JudgmentMeterEvent.class, net.taehui.CommentClass.JudgmentMeterEvent.Builder.class); + } + + public static final int JUDGMENTMETER_FIELD_NUMBER = 1; + private double judgmentMeter_ = 0D; + /** + * double judgmentMeter = 1; + * @return The judgmentMeter. + */ + @java.lang.Override + public double getJudgmentMeter() { + return judgmentMeter_; + } + + public static final int WAIT_FIELD_NUMBER = 2; + private double wait_ = 0D; + /** + * double wait = 2; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + + public static final int ASSIST_FIELD_NUMBER = 3; + private int assist_ = 0; + /** + * int32 assist = 3; + * @return The assist. + */ + @java.lang.Override + public int getAssist() { + return assist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(judgmentMeter_) != 0) { + output.writeDouble(1, judgmentMeter_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + output.writeDouble(2, wait_); + } + if (assist_ != 0) { + output.writeInt32(3, assist_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(judgmentMeter_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, judgmentMeter_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, wait_); + } + if (assist_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, assist_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.CommentClass.JudgmentMeterEvent)) { + return super.equals(obj); + } + net.taehui.CommentClass.JudgmentMeterEvent other = (net.taehui.CommentClass.JudgmentMeterEvent) obj; + + if (java.lang.Double.doubleToLongBits(getJudgmentMeter()) + != java.lang.Double.doubleToLongBits( + other.getJudgmentMeter())) return false; + if (java.lang.Double.doubleToLongBits(getWait()) + != java.lang.Double.doubleToLongBits( + other.getWait())) return false; + if (getAssist() + != other.getAssist()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + JUDGMENTMETER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getJudgmentMeter())); + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWait())); + hash = (37 * hash) + ASSIST_FIELD_NUMBER; + hash = (53 * hash) + getAssist(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.CommentClass.JudgmentMeterEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.CommentClass.JudgmentMeterEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.JudgmentMeterEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.CommentClass.JudgmentMeterEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code JudgmentMeterEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:JudgmentMeterEvent) + net.taehui.CommentClass.JudgmentMeterEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_JudgmentMeterEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_JudgmentMeterEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.JudgmentMeterEvent.class, net.taehui.CommentClass.JudgmentMeterEvent.Builder.class); + } + + // Construct using net.taehui.CommentClass.JudgmentMeterEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + judgmentMeter_ = 0D; + wait_ = 0D; + assist_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.CommentClass.internal_static_JudgmentMeterEvent_descriptor; + } + + @java.lang.Override + public net.taehui.CommentClass.JudgmentMeterEvent getDefaultInstanceForType() { + return net.taehui.CommentClass.JudgmentMeterEvent.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.CommentClass.JudgmentMeterEvent build() { + net.taehui.CommentClass.JudgmentMeterEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.CommentClass.JudgmentMeterEvent buildPartial() { + net.taehui.CommentClass.JudgmentMeterEvent result = new net.taehui.CommentClass.JudgmentMeterEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.CommentClass.JudgmentMeterEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.judgmentMeter_ = judgmentMeter_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = wait_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.assist_ = assist_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.CommentClass.JudgmentMeterEvent) { + return mergeFrom((net.taehui.CommentClass.JudgmentMeterEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.CommentClass.JudgmentMeterEvent other) { + if (other == net.taehui.CommentClass.JudgmentMeterEvent.getDefaultInstance()) return this; + if (other.getJudgmentMeter() != 0D) { + setJudgmentMeter(other.getJudgmentMeter()); + } + if (other.getWait() != 0D) { + setWait(other.getWait()); + } + if (other.getAssist() != 0) { + setAssist(other.getAssist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + judgmentMeter_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: { + wait_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + case 24: { + assist_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private double judgmentMeter_ ; + /** + * double judgmentMeter = 1; + * @return The judgmentMeter. + */ + @java.lang.Override + public double getJudgmentMeter() { + return judgmentMeter_; + } + /** + * double judgmentMeter = 1; + * @param value The judgmentMeter to set. + * @return This builder for chaining. + */ + public Builder setJudgmentMeter(double value) { + + judgmentMeter_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * double judgmentMeter = 1; + * @return This builder for chaining. + */ + public Builder clearJudgmentMeter() { + bitField0_ = (bitField0_ & ~0x00000001); + judgmentMeter_ = 0D; + onChanged(); + return this; + } + + private double wait_ ; + /** + * double wait = 2; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + /** + * double wait = 2; + * @param value The wait to set. + * @return This builder for chaining. + */ + public Builder setWait(double value) { + + wait_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * double wait = 2; + * @return This builder for chaining. + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = 0D; + onChanged(); + return this; + } + + private int assist_ ; + /** + * int32 assist = 3; + * @return The assist. + */ + @java.lang.Override + public int getAssist() { + return assist_; + } + /** + * int32 assist = 3; + * @param value The assist to set. + * @return This builder for chaining. + */ + public Builder setAssist(int value) { + + assist_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 assist = 3; + * @return This builder for chaining. + */ + public Builder clearAssist() { + bitField0_ = (bitField0_ & ~0x00000004); + assist_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:JudgmentMeterEvent) + } + + // @@protoc_insertion_point(class_scope:JudgmentMeterEvent) + private static final net.taehui.CommentClass.JudgmentMeterEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.CommentClass.JudgmentMeterEvent(); + } + + public static net.taehui.CommentClass.JudgmentMeterEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public JudgmentMeterEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.CommentClass.JudgmentMeterEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface PaintEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:PaintEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * double hitPoints = 1; + * @return The hitPoints. + */ + double getHitPoints(); + + /** + * int32 stand = 2; + * @return The stand. + */ + int getStand(); + + /** + * int32 band = 3; + * @return The band. + */ + int getBand(); + + /** + * double point = 4; + * @return The point. + */ + double getPoint(); + + /** + * double wait = 5; + * @return The wait. + */ + double getWait(); + } + /** + * Protobuf type {@code PaintEvent} + */ + public static final class PaintEvent extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:PaintEvent) + PaintEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use PaintEvent.newBuilder() to construct. + private PaintEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private PaintEvent() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new PaintEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_PaintEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_PaintEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.PaintEvent.class, net.taehui.CommentClass.PaintEvent.Builder.class); + } + + public static final int HITPOINTS_FIELD_NUMBER = 1; + private double hitPoints_ = 0D; + /** + * double hitPoints = 1; + * @return The hitPoints. + */ + @java.lang.Override + public double getHitPoints() { + return hitPoints_; + } + + public static final int STAND_FIELD_NUMBER = 2; + private int stand_ = 0; + /** + * int32 stand = 2; + * @return The stand. + */ + @java.lang.Override + public int getStand() { + return stand_; + } + + public static final int BAND_FIELD_NUMBER = 3; + private int band_ = 0; + /** + * int32 band = 3; + * @return The band. + */ + @java.lang.Override + public int getBand() { + return band_; + } + + public static final int POINT_FIELD_NUMBER = 4; + private double point_ = 0D; + /** + * double point = 4; + * @return The point. + */ + @java.lang.Override + public double getPoint() { + return point_; + } + + public static final int WAIT_FIELD_NUMBER = 5; + private double wait_ = 0D; + /** + * double wait = 5; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(hitPoints_) != 0) { + output.writeDouble(1, hitPoints_); + } + if (stand_ != 0) { + output.writeInt32(2, stand_); + } + if (band_ != 0) { + output.writeInt32(3, band_); + } + if (java.lang.Double.doubleToRawLongBits(point_) != 0) { + output.writeDouble(4, point_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + output.writeDouble(5, wait_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(hitPoints_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, hitPoints_); + } + if (stand_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, stand_); + } + if (band_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, band_); + } + if (java.lang.Double.doubleToRawLongBits(point_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, point_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(5, wait_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.CommentClass.PaintEvent)) { + return super.equals(obj); + } + net.taehui.CommentClass.PaintEvent other = (net.taehui.CommentClass.PaintEvent) obj; + + if (java.lang.Double.doubleToLongBits(getHitPoints()) + != java.lang.Double.doubleToLongBits( + other.getHitPoints())) return false; + if (getStand() + != other.getStand()) return false; + if (getBand() + != other.getBand()) return false; + if (java.lang.Double.doubleToLongBits(getPoint()) + != java.lang.Double.doubleToLongBits( + other.getPoint())) return false; + if (java.lang.Double.doubleToLongBits(getWait()) + != java.lang.Double.doubleToLongBits( + other.getWait())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HITPOINTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHitPoints())); + hash = (37 * hash) + STAND_FIELD_NUMBER; + hash = (53 * hash) + getStand(); + hash = (37 * hash) + BAND_FIELD_NUMBER; + hash = (53 * hash) + getBand(); + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPoint())); + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWait())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.CommentClass.PaintEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.PaintEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.PaintEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.PaintEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.PaintEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.PaintEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.PaintEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.PaintEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.CommentClass.PaintEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.CommentClass.PaintEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.CommentClass.PaintEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.PaintEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.CommentClass.PaintEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code PaintEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:PaintEvent) + net.taehui.CommentClass.PaintEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_PaintEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_PaintEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.PaintEvent.class, net.taehui.CommentClass.PaintEvent.Builder.class); + } + + // Construct using net.taehui.CommentClass.PaintEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + hitPoints_ = 0D; + stand_ = 0; + band_ = 0; + point_ = 0D; + wait_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.CommentClass.internal_static_PaintEvent_descriptor; + } + + @java.lang.Override + public net.taehui.CommentClass.PaintEvent getDefaultInstanceForType() { + return net.taehui.CommentClass.PaintEvent.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.CommentClass.PaintEvent build() { + net.taehui.CommentClass.PaintEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.CommentClass.PaintEvent buildPartial() { + net.taehui.CommentClass.PaintEvent result = new net.taehui.CommentClass.PaintEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.CommentClass.PaintEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.hitPoints_ = hitPoints_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.stand_ = stand_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.band_ = band_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.point_ = point_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.wait_ = wait_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.CommentClass.PaintEvent) { + return mergeFrom((net.taehui.CommentClass.PaintEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.CommentClass.PaintEvent other) { + if (other == net.taehui.CommentClass.PaintEvent.getDefaultInstance()) return this; + if (other.getHitPoints() != 0D) { + setHitPoints(other.getHitPoints()); + } + if (other.getStand() != 0) { + setStand(other.getStand()); + } + if (other.getBand() != 0) { + setBand(other.getBand()); + } + if (other.getPoint() != 0D) { + setPoint(other.getPoint()); + } + if (other.getWait() != 0D) { + setWait(other.getWait()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + hitPoints_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 16: { + stand_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + band_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 33: { + point_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 41: { + wait_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private double hitPoints_ ; + /** + * double hitPoints = 1; + * @return The hitPoints. + */ + @java.lang.Override + public double getHitPoints() { + return hitPoints_; + } + /** + * double hitPoints = 1; + * @param value The hitPoints to set. + * @return This builder for chaining. + */ + public Builder setHitPoints(double value) { + + hitPoints_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * double hitPoints = 1; + * @return This builder for chaining. + */ + public Builder clearHitPoints() { + bitField0_ = (bitField0_ & ~0x00000001); + hitPoints_ = 0D; + onChanged(); + return this; + } + + private int stand_ ; + /** + * int32 stand = 2; + * @return The stand. + */ + @java.lang.Override + public int getStand() { + return stand_; + } + /** + * int32 stand = 2; + * @param value The stand to set. + * @return This builder for chaining. + */ + public Builder setStand(int value) { + + stand_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 stand = 2; + * @return This builder for chaining. + */ + public Builder clearStand() { + bitField0_ = (bitField0_ & ~0x00000002); + stand_ = 0; + onChanged(); + return this; + } + + private int band_ ; + /** + * int32 band = 3; + * @return The band. + */ + @java.lang.Override + public int getBand() { + return band_; + } + /** + * int32 band = 3; + * @param value The band to set. + * @return This builder for chaining. + */ + public Builder setBand(int value) { + + band_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 band = 3; + * @return This builder for chaining. + */ + public Builder clearBand() { + bitField0_ = (bitField0_ & ~0x00000004); + band_ = 0; + onChanged(); + return this; + } + + private double point_ ; + /** + * double point = 4; + * @return The point. + */ + @java.lang.Override + public double getPoint() { + return point_; + } + /** + * double point = 4; + * @param value The point to set. + * @return This builder for chaining. + */ + public Builder setPoint(double value) { + + point_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * double point = 4; + * @return This builder for chaining. + */ + public Builder clearPoint() { + bitField0_ = (bitField0_ & ~0x00000008); + point_ = 0D; + onChanged(); + return this; + } + + private double wait_ ; + /** + * double wait = 5; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + /** + * double wait = 5; + * @param value The wait to set. + * @return This builder for chaining. + */ + public Builder setWait(double value) { + + wait_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * double wait = 5; + * @return This builder for chaining. + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000010); + wait_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:PaintEvent) + } + + // @@protoc_insertion_point(class_scope:PaintEvent) + private static final net.taehui.CommentClass.PaintEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.CommentClass.PaintEvent(); + } + + public static net.taehui.CommentClass.PaintEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PaintEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.CommentClass.PaintEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface AudioMultiplierEventOrBuilder extends + // @@protoc_insertion_point(interface_extends:AudioMultiplierEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * double audioMultiplier = 1; + * @return The audioMultiplier. + */ + double getAudioMultiplier(); + + /** + * double wait = 2; + * @return The wait. + */ + double getWait(); + } + /** + * Protobuf type {@code AudioMultiplierEvent} + */ + public static final class AudioMultiplierEvent extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:AudioMultiplierEvent) + AudioMultiplierEventOrBuilder { + private static final long serialVersionUID = 0L; + // Use AudioMultiplierEvent.newBuilder() to construct. + private AudioMultiplierEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private AudioMultiplierEvent() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new AudioMultiplierEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_AudioMultiplierEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_AudioMultiplierEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.AudioMultiplierEvent.class, net.taehui.CommentClass.AudioMultiplierEvent.Builder.class); + } + + public static final int AUDIOMULTIPLIER_FIELD_NUMBER = 1; + private double audioMultiplier_ = 0D; + /** + * double audioMultiplier = 1; + * @return The audioMultiplier. + */ + @java.lang.Override + public double getAudioMultiplier() { + return audioMultiplier_; + } + + public static final int WAIT_FIELD_NUMBER = 2; + private double wait_ = 0D; + /** + * double wait = 2; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Double.doubleToRawLongBits(audioMultiplier_) != 0) { + output.writeDouble(1, audioMultiplier_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + output.writeDouble(2, wait_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Double.doubleToRawLongBits(audioMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, audioMultiplier_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, wait_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.CommentClass.AudioMultiplierEvent)) { + return super.equals(obj); + } + net.taehui.CommentClass.AudioMultiplierEvent other = (net.taehui.CommentClass.AudioMultiplierEvent) obj; + + if (java.lang.Double.doubleToLongBits(getAudioMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getAudioMultiplier())) return false; + if (java.lang.Double.doubleToLongBits(getWait()) + != java.lang.Double.doubleToLongBits( + other.getWait())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AUDIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAudioMultiplier())); + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWait())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.CommentClass.AudioMultiplierEvent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.CommentClass.AudioMultiplierEvent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.CommentClass.AudioMultiplierEvent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.CommentClass.AudioMultiplierEvent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code AudioMultiplierEvent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:AudioMultiplierEvent) + net.taehui.CommentClass.AudioMultiplierEventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.CommentClass.internal_static_AudioMultiplierEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.CommentClass.internal_static_AudioMultiplierEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.CommentClass.AudioMultiplierEvent.class, net.taehui.CommentClass.AudioMultiplierEvent.Builder.class); + } + + // Construct using net.taehui.CommentClass.AudioMultiplierEvent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + audioMultiplier_ = 0D; + wait_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.CommentClass.internal_static_AudioMultiplierEvent_descriptor; + } + + @java.lang.Override + public net.taehui.CommentClass.AudioMultiplierEvent getDefaultInstanceForType() { + return net.taehui.CommentClass.AudioMultiplierEvent.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.CommentClass.AudioMultiplierEvent build() { + net.taehui.CommentClass.AudioMultiplierEvent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.CommentClass.AudioMultiplierEvent buildPartial() { + net.taehui.CommentClass.AudioMultiplierEvent result = new net.taehui.CommentClass.AudioMultiplierEvent(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.CommentClass.AudioMultiplierEvent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.audioMultiplier_ = audioMultiplier_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.wait_ = wait_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.CommentClass.AudioMultiplierEvent) { + return mergeFrom((net.taehui.CommentClass.AudioMultiplierEvent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.CommentClass.AudioMultiplierEvent other) { + if (other == net.taehui.CommentClass.AudioMultiplierEvent.getDefaultInstance()) return this; + if (other.getAudioMultiplier() != 0D) { + setAudioMultiplier(other.getAudioMultiplier()); + } + if (other.getWait() != 0D) { + setWait(other.getWait()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + audioMultiplier_ = input.readDouble(); + bitField0_ |= 0x00000001; + break; + } // case 9 + case 17: { + wait_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private double audioMultiplier_ ; + /** + * double audioMultiplier = 1; + * @return The audioMultiplier. + */ + @java.lang.Override + public double getAudioMultiplier() { + return audioMultiplier_; + } + /** + * double audioMultiplier = 1; + * @param value The audioMultiplier to set. + * @return This builder for chaining. + */ + public Builder setAudioMultiplier(double value) { + + audioMultiplier_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * double audioMultiplier = 1; + * @return This builder for chaining. + */ + public Builder clearAudioMultiplier() { + bitField0_ = (bitField0_ & ~0x00000001); + audioMultiplier_ = 0D; + onChanged(); + return this; + } + + private double wait_ ; + /** + * double wait = 2; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + /** + * double wait = 2; + * @param value The wait to set. + * @return This builder for chaining. + */ + public Builder setWait(double value) { + + wait_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * double wait = 2; + * @return This builder for chaining. + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000002); + wait_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:AudioMultiplierEvent) + } + + // @@protoc_insertion_point(class_scope:AudioMultiplierEvent) + private static final net.taehui.CommentClass.AudioMultiplierEvent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.CommentClass.AudioMultiplierEvent(); + } + + public static net.taehui.CommentClass.AudioMultiplierEvent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AudioMultiplierEvent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.CommentClass.AudioMultiplierEvent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Comment_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Comment_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_InputEvent_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_InputEvent_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_MultiplierEvent_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_MultiplierEvent_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_JudgmentMeterEvent_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_JudgmentMeterEvent_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_PaintEvent_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_PaintEvent_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_AudioMultiplierEvent_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_AudioMultiplierEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\rComment.proto\"\256\003\n\007Comment\022\014\n\004date\030\001 \001(" + + "\t\022\027\n\017highestJudgment\030\002 \001(\005\022\026\n\016higherJudg" + + "ment\030\003 \001(\005\022\024\n\014highJudgment\030\004 \001(\005\022\023\n\013lowJ" + + "udgment\030\005 \001(\005\022\025\n\rlowerJudgment\030\006 \001(\005\022\026\n\016" + + "lowestJudgment\030\007 \001(\005\022\033\n\006inputs\030\010 \003(\0132\013.I" + + "nputEvent\022%\n\013multipliers\030\t \003(\0132\020.Multipl" + + "ierEvent\022\033\n\006paints\030\n \003(\0132\013.PaintEvent\022\020\n" + + "\010loopUnit\030\013 \001(\005\022+\n\016judgmentMeters\030\014 \003(\0132" + + "\023.JudgmentMeterEvent\022/\n\020audioMultipliers" + + "\030\r \003(\0132\025.AudioMultiplierEvent\022\031\n\021levying" + + "Multiplier\030\016 \001(\001\022\036\n\026levyingAudioMultipli" + + "er\030\017 \001(\001\"I\n\nInputEvent\022\r\n\005input\030\001 \001(\005\022\014\n" + + "\004wait\030\002 \001(\001\022\016\n\006noteID\030\003 \001(\005\022\016\n\006judged\030\004 " + + "\001(\005\"H\n\017MultiplierEvent\022\022\n\nmultiplier\030\001 \001" + + "(\001\022\014\n\004wait\030\002 \001(\001\022\023\n\013isAutoEvent\030\003 \001(\010\"I\n" + + "\022JudgmentMeterEvent\022\025\n\rjudgmentMeter\030\001 \001" + + "(\001\022\014\n\004wait\030\002 \001(\001\022\016\n\006assist\030\003 \001(\005\"Y\n\nPain" + + "tEvent\022\021\n\thitPoints\030\001 \001(\001\022\r\n\005stand\030\002 \001(\005" + + "\022\014\n\004band\030\003 \001(\005\022\r\n\005point\030\004 \001(\001\022\014\n\004wait\030\005 " + + "\001(\001\"=\n\024AudioMultiplierEvent\022\027\n\017audioMult" + + "iplier\030\001 \001(\001\022\014\n\004wait\030\002 \001(\001B%\n\nnet.taehui" + + "B\014CommentClass\252\002\010Qwilightb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_Comment_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Comment_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Comment_descriptor, + new java.lang.String[] { "Date", "HighestJudgment", "HigherJudgment", "HighJudgment", "LowJudgment", "LowerJudgment", "LowestJudgment", "Inputs", "Multipliers", "Paints", "LoopUnit", "JudgmentMeters", "AudioMultipliers", "LevyingMultiplier", "LevyingAudioMultiplier", }); + internal_static_InputEvent_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_InputEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_InputEvent_descriptor, + new java.lang.String[] { "Input", "Wait", "NoteID", "Judged", }); + internal_static_MultiplierEvent_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_MultiplierEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_MultiplierEvent_descriptor, + new java.lang.String[] { "Multiplier", "Wait", "IsAutoEvent", }); + internal_static_JudgmentMeterEvent_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_JudgmentMeterEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_JudgmentMeterEvent_descriptor, + new java.lang.String[] { "JudgmentMeter", "Wait", "Assist", }); + internal_static_PaintEvent_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_PaintEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_PaintEvent_descriptor, + new java.lang.String[] { "HitPoints", "Stand", "Band", "Point", "Wait", }); + internal_static_AudioMultiplierEvent_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_AudioMultiplierEvent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_AudioMultiplierEvent_descriptor, + new java.lang.String[] { "AudioMultiplier", "Wait", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/java/net/taehui/EventClass.java b/src/main/java/net/taehui/EventClass.java new file mode 100644 index 0000000..64bf2f2 --- /dev/null +++ b/src/main/java/net/taehui/EventClass.java @@ -0,0 +1,28544 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Event.proto + +// Protobuf Java Version: 3.25.0 +package net.taehui; + +public final class EventClass { + private EventClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface EventOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event) + com.google.protobuf.MessageOrBuilder { + + /** + * int64 millis = 1; + * @return The millis. + */ + long getMillis(); + + /** + * string avatarID = 2; + * @return The avatarID. + */ + java.lang.String getAvatarID(); + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + com.google.protobuf.ByteString + getAvatarIDBytes(); + + /** + * .Event.EventID eventID = 3; + * @return The enum numeric value on the wire for eventID. + */ + int getEventIDValue(); + /** + * .Event.EventID eventID = 3; + * @return The eventID. + */ + net.taehui.EventClass.Event.EventID getEventID(); + + /** + * string text = 4; + * @return The text. + */ + java.lang.String getText(); + /** + * string text = 4; + * @return The bytes for text. + */ + com.google.protobuf.ByteString + getTextBytes(); + + /** + * repeated bytes data = 5; + * @return A list containing the data. + */ + java.util.List getDataList(); + /** + * repeated bytes data = 5; + * @return The count of data. + */ + int getDataCount(); + /** + * repeated bytes data = 5; + * @param index The index of the element to return. + * @return The data at the given index. + */ + com.google.protobuf.ByteString getData(int index); + + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + * @return Whether the qwilightCallNet field is set. + */ + boolean hasQwilightCallNet(); + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + * @return The qwilightCallNet. + */ + net.taehui.EventClass.Event.QwilightCallNet getQwilightCallNet(); + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + net.taehui.EventClass.Event.QwilightCallNetOrBuilder getQwilightCallNetOrBuilder(); + + /** + * .Event.TwilightCallNet twilightCallNet = 7; + * @return Whether the twilightCallNet field is set. + */ + boolean hasTwilightCallNet(); + /** + * .Event.TwilightCallNet twilightCallNet = 7; + * @return The twilightCallNet. + */ + net.taehui.EventClass.Event.TwilightCallNet getTwilightCallNet(); + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + net.taehui.EventClass.Event.TwilightCallNetOrBuilder getTwilightCallNetOrBuilder(); + + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + * @return Whether the qwilightIOInput field is set. + */ + boolean hasQwilightIOInput(); + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + * @return The qwilightIOInput. + */ + net.taehui.EventClass.Event.QwilightIOInput getQwilightIOInput(); + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + net.taehui.EventClass.Event.QwilightIOInputOrBuilder getQwilightIOInputOrBuilder(); + + /** + * .Event.TwilightIOInput twilightIOInput = 9; + * @return Whether the twilightIOInput field is set. + */ + boolean hasTwilightIOInput(); + /** + * .Event.TwilightIOInput twilightIOInput = 9; + * @return The twilightIOInput. + */ + net.taehui.EventClass.Event.TwilightIOInput getTwilightIOInput(); + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + net.taehui.EventClass.Event.TwilightIOInputOrBuilder getTwilightIOInputOrBuilder(); + + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + * @return Whether the qwilightIOJudge field is set. + */ + boolean hasQwilightIOJudge(); + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + * @return The qwilightIOJudge. + */ + net.taehui.EventClass.Event.QwilightIOJudge getQwilightIOJudge(); + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + net.taehui.EventClass.Event.QwilightIOJudgeOrBuilder getQwilightIOJudgeOrBuilder(); + + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + * @return Whether the twilightIOJudge field is set. + */ + boolean hasTwilightIOJudge(); + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + * @return The twilightIOJudge. + */ + net.taehui.EventClass.Event.TwilightIOJudge getTwilightIOJudge(); + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + net.taehui.EventClass.Event.TwilightIOJudgeOrBuilder getTwilightIOJudgeOrBuilder(); + + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + * @return Whether the qwilightIOJudgmentMeter field is set. + */ + boolean hasQwilightIOJudgmentMeter(); + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + * @return The qwilightIOJudgmentMeter. + */ + net.taehui.EventClass.Event.QwilightIOJudgmentMeter getQwilightIOJudgmentMeter(); + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + net.taehui.EventClass.Event.QwilightIOJudgmentMeterOrBuilder getQwilightIOJudgmentMeterOrBuilder(); + + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + * @return Whether the twilightIOJudgmentMeter field is set. + */ + boolean hasTwilightIOJudgmentMeter(); + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + * @return The twilightIOJudgmentMeter. + */ + net.taehui.EventClass.Event.TwilightIOJudgmentMeter getTwilightIOJudgmentMeter(); + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + net.taehui.EventClass.Event.TwilightIOJudgmentMeterOrBuilder getTwilightIOJudgmentMeterOrBuilder(); + + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + * @return Whether the qwilightIONoteVisibility field is set. + */ + boolean hasQwilightIONoteVisibility(); + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + * @return The qwilightIONoteVisibility. + */ + net.taehui.EventClass.Event.QwilightIONoteVisibility getQwilightIONoteVisibility(); + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + net.taehui.EventClass.Event.QwilightIONoteVisibilityOrBuilder getQwilightIONoteVisibilityOrBuilder(); + + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + * @return Whether the twilightIONoteVisibility field is set. + */ + boolean hasTwilightIONoteVisibility(); + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + * @return The twilightIONoteVisibility. + */ + net.taehui.EventClass.Event.TwilightIONoteVisibility getTwilightIONoteVisibility(); + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + net.taehui.EventClass.Event.TwilightIONoteVisibilityOrBuilder getTwilightIONoteVisibilityOrBuilder(); + + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + * @return Whether the qwilightIOMultiplier field is set. + */ + boolean hasQwilightIOMultiplier(); + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + * @return The qwilightIOMultiplier. + */ + net.taehui.EventClass.Event.QwilightIOMultiplier getQwilightIOMultiplier(); + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + net.taehui.EventClass.Event.QwilightIOMultiplierOrBuilder getQwilightIOMultiplierOrBuilder(); + + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + * @return Whether the twilightIOMultiplier field is set. + */ + boolean hasTwilightIOMultiplier(); + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + * @return The twilightIOMultiplier. + */ + net.taehui.EventClass.Event.TwilightIOMultiplier getTwilightIOMultiplier(); + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + net.taehui.EventClass.Event.TwilightIOMultiplierOrBuilder getTwilightIOMultiplierOrBuilder(); + + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + * @return Whether the qwilightIOAudioMultiplier field is set. + */ + boolean hasQwilightIOAudioMultiplier(); + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + * @return The qwilightIOAudioMultiplier. + */ + net.taehui.EventClass.Event.QwilightIOAudioMultiplier getQwilightIOAudioMultiplier(); + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + net.taehui.EventClass.Event.QwilightIOAudioMultiplierOrBuilder getQwilightIOAudioMultiplierOrBuilder(); + + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + * @return Whether the twilightIOAudioMultiplier field is set. + */ + boolean hasTwilightIOAudioMultiplier(); + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + * @return The twilightIOAudioMultiplier. + */ + net.taehui.EventClass.Event.TwilightIOAudioMultiplier getTwilightIOAudioMultiplier(); + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + net.taehui.EventClass.Event.TwilightIOAudioMultiplierOrBuilder getTwilightIOAudioMultiplierOrBuilder(); + + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + * @return Whether the twilightAudioInput field is set. + */ + boolean hasTwilightAudioInput(); + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + * @return The twilightAudioInput. + */ + net.taehui.EventClass.Event.TwilightAudioInput getTwilightAudioInput(); + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + net.taehui.EventClass.Event.TwilightAudioInputOrBuilder getTwilightAudioInputOrBuilder(); + + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + * @return Whether the qwilightPostItem field is set. + */ + boolean hasQwilightPostItem(); + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + * @return The qwilightPostItem. + */ + net.taehui.EventClass.Event.QwilightPostItem getQwilightPostItem(); + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + net.taehui.EventClass.Event.QwilightPostItemOrBuilder getQwilightPostItemOrBuilder(); + + /** + * .Event.TwilightPostItem twilightPostItem = 22; + * @return Whether the twilightPostItem field is set. + */ + boolean hasTwilightPostItem(); + /** + * .Event.TwilightPostItem twilightPostItem = 22; + * @return The twilightPostItem. + */ + net.taehui.EventClass.Event.TwilightPostItem getTwilightPostItem(); + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + net.taehui.EventClass.Event.TwilightPostItemOrBuilder getTwilightPostItemOrBuilder(); + + net.taehui.EventClass.Event.FastTextCase getFastTextCase(); + } + /** + * Protobuf type {@code Event} + */ + public static final class Event extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event) + EventOrBuilder { + private static final long serialVersionUID = 0L; + // Use Event.newBuilder() to construct. + private Event(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private Event() { + avatarID_ = ""; + eventID_ = 0; + text_ = ""; + data_ = emptyList(com.google.protobuf.ByteString.class); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new Event(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.class, net.taehui.EventClass.Event.Builder.class); + } + + /** + * Protobuf enum {@code Event.AvatarNetStatus} + */ + public enum AvatarNetStatus + implements com.google.protobuf.ProtocolMessageEnum { + /** + * Default = 0; + */ + Default(0), + /** + * Clear = 1; + */ + Clear(1), + /** + * Failed = 2; + */ + Failed(2), + UNRECOGNIZED(-1), + ; + + /** + * Default = 0; + */ + public static final int Default_VALUE = 0; + /** + * Clear = 1; + */ + public static final int Clear_VALUE = 1; + /** + * Failed = 2; + */ + public static final int Failed_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static AvatarNetStatus valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static AvatarNetStatus forNumber(int value) { + switch (value) { + case 0: return Default; + case 1: return Clear; + case 2: return Failed; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + AvatarNetStatus> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public AvatarNetStatus findValueByNumber(int number) { + return AvatarNetStatus.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return net.taehui.EventClass.Event.getDescriptor().getEnumTypes().get(0); + } + + private static final AvatarNetStatus[] VALUES = values(); + + public static AvatarNetStatus valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private AvatarNetStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:Event.AvatarNetStatus) + } + + /** + * Protobuf enum {@code Event.EventID} + */ + public enum EventID + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SIGN_IN = 0; + */ + SIGN_IN(0), + /** + * NOT_SIGN_IN = 1; + */ + NOT_SIGN_IN(1), + /** + * WARNING = 2; + */ + WARNING(2), + /** + * SITE_YELL = 3; + */ + SITE_YELL(3), + /** + * CALL_BUNDLE = 4; + */ + CALL_BUNDLE(4), + /** + * SAVE_AS_BUNDLE = 5; + */ + SAVE_AS_BUNDLE(5), + /** + * SAVING_BUNDLE = 6; + */ + SAVING_BUNDLE(6), + /** + * WIPE_BUNDLE = 7; + */ + WIPE_BUNDLE(7), + /** + * SET_BUNDLE = 8; + */ + SET_BUNDLE(8), + /** + * CALL_UBUNTU = 9; + */ + CALL_UBUNTU(9), + /** + * CALL_SITE_AVATAR = 10; + */ + CALL_SITE_AVATAR(10), + /** + * COMMENT = 11; + */ + COMMENT(11), + /** + * SET_SITUATION = 12; + */ + SET_SITUATION(12), + /** + * NEW_TITLE = 13; + */ + NEW_TITLE(13), + /** + * STOP_SAVING_BUNDLE = 14; + */ + STOP_SAVING_BUNDLE(14), + /** + * SAVED_BUNDLE = 15; + */ + SAVED_BUNDLE(15), + /** + * SAVE_BUNDLE = 16; + */ + SAVE_BUNDLE(16), + /** + * ENTER_SITE = 17; + */ + ENTER_SITE(17), + /** + * QUIT_SITE = 18; + */ + QUIT_SITE(18), + /** + * WIPE_UBUNTU = 19; + */ + WIPE_UBUNTU(19), + /** + * NEW_SITE = 20; + */ + NEW_SITE(20), + /** + * NEW_UBUNTU = 21; + */ + NEW_UBUNTU(21), + /** + * EXILE_AVATAR = 22; + */ + EXILE_AVATAR(22), + /** + * NEW_SILENT_SITE = 23; + */ + NEW_SILENT_SITE(23), + /** + * ESTABLISH = 24; + */ + ESTABLISH(24), + /** + * CALL_CONFIGURE = 25; + */ + CALL_CONFIGURE(25), + /** + * SET_CONFIGURE = 26; + */ + SET_CONFIGURE(26), + /** + * NOTIFY_INFO = 27; + */ + NOTIFY_INFO(27), + /** + * LEVY_NET = 28; + */ + LEVY_NET(28), + /** + * COMPILED = 29; + */ + COMPILED(29), + /** + * CALL_NET = 30; + */ + CALL_NET(30), + /** + * SET_MODE_COMPONENT = 31; + */ + SET_MODE_COMPONENT(31), + /** + * SET_FAVOR_MODE_COMPONENT = 32; + */ + SET_FAVOR_MODE_COMPONENT(32), + /** + * SET_VALID_HUNTER_MODE = 33; + */ + SET_VALID_HUNTER_MODE(33), + /** + * CALL_NET_SITE_COMMENTS = 34; + */ + CALL_NET_SITE_COMMENTS(34), + /** + * SET_NOTE_FILE = 35; + */ + SET_NOTE_FILE(35), + /** + * SET_SITE_NAME = 36; + */ + SET_SITE_NAME(36), + /** + * SET_SITE_HAND = 37; + */ + SET_SITE_HAND(37), + /** + * QUIT_NET = 38; + */ + QUIT_NET(38), + /** + * SAVING_AS_BUNDLE = 39; + */ + SAVING_AS_BUNDLE(39), + /** + * SAVED_AS_BUNDLE = 40; + */ + SAVED_AS_BUNDLE(40), + /** + * STOP_SAVING_AS_BUNDLE = 41; + */ + STOP_SAVING_AS_BUNDLE(41), + /** + * SAVE_DEFAULT_NOTE = 42; + */ + SAVE_DEFAULT_NOTE(42), + /** + * POST_FILE = 43; + */ + POST_FILE(43), + /** + * SAVE_DEFAULT_UI = 44; + */ + SAVE_DEFAULT_UI(44), + /** + * SET_FAVOR_AUDIO_MULTIPLIER = 45; + */ + SET_FAVOR_AUDIO_MULTIPLIER(45), + /** + * CALL_SITE_NET = 46; + */ + CALL_SITE_NET(46), + /** + * NOTIFY_YES = 47; + */ + NOTIFY_YES(47), + /** + * CALL_IO = 48; + */ + CALL_IO(48), + /** + * CALL_IO_COMPONENT = 49; + */ + CALL_IO_COMPONENT(49), + /** + * COMPILED_IO = 50; + */ + COMPILED_IO(50), + /** + * LEVY_IO = 51; + */ + LEVY_IO(51), + /** + * IO_INPUT = 52; + */ + IO_INPUT(52), + /** + * IO_JUDGE = 53; + */ + IO_JUDGE(53), + /** + * IO_NOTE_VISIBILITY = 54; + */ + IO_NOTE_VISIBILITY(54), + /** + * IO_JUDGMENT_METER = 56; + */ + IO_JUDGMENT_METER(56), + /** + * IO_MULTIPLIER = 57; + */ + IO_MULTIPLIER(57), + /** + * IO_AUDIO_MULTIPLIER = 58; + */ + IO_AUDIO_MULTIPLIER(58), + /** + * IO_PAUSE = 59; + */ + IO_PAUSE(59), + /** + * IO_QUIT = 60; + */ + IO_QUIT(60), + /** + * IO_NOT = 61; + */ + IO_NOT(61), + /** + * AUDIO_INPUT = 62; + */ + AUDIO_INPUT(62), + /** + * CALL_SITE_MODE_COMPONENT = 63; + */ + CALL_SITE_MODE_COMPONENT(63), + /** + * COMMENTARY = 65; + */ + COMMENTARY(65), + /** + * WWW_LEVEL = 66; + */ + WWW_LEVEL(66), + /** + * AVATAR_TITLE = 67; + */ + AVATAR_TITLE(67), + /** + * INVALIDATE_AVATAR_DRAWING = 68; + */ + INVALIDATE_AVATAR_DRAWING(68), + /** + * INVALIDATE_AVATAR_TITLE = 69; + */ + INVALIDATE_AVATAR_TITLE(69), + /** + * LEVEL_UP = 70; + */ + LEVEL_UP(70), + /** + * SET_FAVOR_NOTE_FILE = 71; + */ + SET_FAVOR_NOTE_FILE(71), + /** + * GET_SITE_YELLS = 72; + */ + GET_SITE_YELLS(72), + /** + * SET_LANGUAGE = 73; + */ + SET_LANGUAGE(73), + /** + * VALVE_COMMENT = 74; + */ + VALVE_COMMENT(74), + /** + * ABILITY_UP = 75; + */ + ABILITY_UP(75), + /** + * CLOSE = 76; + */ + CLOSE(76), + /** + * UNAVAILABLE_DATE = 77; + */ + UNAVAILABLE_DATE(77), + /** + * AVATAR_EDGE = 78; + */ + AVATAR_EDGE(78), + /** + * INVALIDATE_AVATAR_EDGE = 79; + */ + INVALIDATE_AVATAR_EDGE(79), + /** + * FAILED_VALIDATE_TOTEM = 80; + */ + FAILED_VALIDATE_TOTEM(80), + /** + * MODIFY_SITE_YELL = 81; + */ + MODIFY_SITE_YELL(81), + /** + * WIPE_SITE_YELL = 82; + */ + WIPE_SITE_YELL(82), + /** + * ALREADY_LOADING_BUNDLE = 83; + */ + ALREADY_LOADING_BUNDLE(83), + /** + * SET_FAVOR = 84; + */ + SET_FAVOR(84), + /** + * SET_AUTO_SITE_HAND = 85; + */ + SET_AUTO_SITE_HAND(85), + /** + * SET_AVATAR_GROUP = 86; + */ + SET_AVATAR_GROUP(86), + /** + * POST_ITEM = 87; + */ + POST_ITEM(87), + /** + * SET_VALID_NET_MODE = 88; + */ + SET_VALID_NET_MODE(88), + /** + * SET_ALLOWED_POSTABLE_ITEMS = 89; + */ + SET_ALLOWED_POSTABLE_ITEMS(89), + UNRECOGNIZED(-1), + ; + + /** + * SIGN_IN = 0; + */ + public static final int SIGN_IN_VALUE = 0; + /** + * NOT_SIGN_IN = 1; + */ + public static final int NOT_SIGN_IN_VALUE = 1; + /** + * WARNING = 2; + */ + public static final int WARNING_VALUE = 2; + /** + * SITE_YELL = 3; + */ + public static final int SITE_YELL_VALUE = 3; + /** + * CALL_BUNDLE = 4; + */ + public static final int CALL_BUNDLE_VALUE = 4; + /** + * SAVE_AS_BUNDLE = 5; + */ + public static final int SAVE_AS_BUNDLE_VALUE = 5; + /** + * SAVING_BUNDLE = 6; + */ + public static final int SAVING_BUNDLE_VALUE = 6; + /** + * WIPE_BUNDLE = 7; + */ + public static final int WIPE_BUNDLE_VALUE = 7; + /** + * SET_BUNDLE = 8; + */ + public static final int SET_BUNDLE_VALUE = 8; + /** + * CALL_UBUNTU = 9; + */ + public static final int CALL_UBUNTU_VALUE = 9; + /** + * CALL_SITE_AVATAR = 10; + */ + public static final int CALL_SITE_AVATAR_VALUE = 10; + /** + * COMMENT = 11; + */ + public static final int COMMENT_VALUE = 11; + /** + * SET_SITUATION = 12; + */ + public static final int SET_SITUATION_VALUE = 12; + /** + * NEW_TITLE = 13; + */ + public static final int NEW_TITLE_VALUE = 13; + /** + * STOP_SAVING_BUNDLE = 14; + */ + public static final int STOP_SAVING_BUNDLE_VALUE = 14; + /** + * SAVED_BUNDLE = 15; + */ + public static final int SAVED_BUNDLE_VALUE = 15; + /** + * SAVE_BUNDLE = 16; + */ + public static final int SAVE_BUNDLE_VALUE = 16; + /** + * ENTER_SITE = 17; + */ + public static final int ENTER_SITE_VALUE = 17; + /** + * QUIT_SITE = 18; + */ + public static final int QUIT_SITE_VALUE = 18; + /** + * WIPE_UBUNTU = 19; + */ + public static final int WIPE_UBUNTU_VALUE = 19; + /** + * NEW_SITE = 20; + */ + public static final int NEW_SITE_VALUE = 20; + /** + * NEW_UBUNTU = 21; + */ + public static final int NEW_UBUNTU_VALUE = 21; + /** + * EXILE_AVATAR = 22; + */ + public static final int EXILE_AVATAR_VALUE = 22; + /** + * NEW_SILENT_SITE = 23; + */ + public static final int NEW_SILENT_SITE_VALUE = 23; + /** + * ESTABLISH = 24; + */ + public static final int ESTABLISH_VALUE = 24; + /** + * CALL_CONFIGURE = 25; + */ + public static final int CALL_CONFIGURE_VALUE = 25; + /** + * SET_CONFIGURE = 26; + */ + public static final int SET_CONFIGURE_VALUE = 26; + /** + * NOTIFY_INFO = 27; + */ + public static final int NOTIFY_INFO_VALUE = 27; + /** + * LEVY_NET = 28; + */ + public static final int LEVY_NET_VALUE = 28; + /** + * COMPILED = 29; + */ + public static final int COMPILED_VALUE = 29; + /** + * CALL_NET = 30; + */ + public static final int CALL_NET_VALUE = 30; + /** + * SET_MODE_COMPONENT = 31; + */ + public static final int SET_MODE_COMPONENT_VALUE = 31; + /** + * SET_FAVOR_MODE_COMPONENT = 32; + */ + public static final int SET_FAVOR_MODE_COMPONENT_VALUE = 32; + /** + * SET_VALID_HUNTER_MODE = 33; + */ + public static final int SET_VALID_HUNTER_MODE_VALUE = 33; + /** + * CALL_NET_SITE_COMMENTS = 34; + */ + public static final int CALL_NET_SITE_COMMENTS_VALUE = 34; + /** + * SET_NOTE_FILE = 35; + */ + public static final int SET_NOTE_FILE_VALUE = 35; + /** + * SET_SITE_NAME = 36; + */ + public static final int SET_SITE_NAME_VALUE = 36; + /** + * SET_SITE_HAND = 37; + */ + public static final int SET_SITE_HAND_VALUE = 37; + /** + * QUIT_NET = 38; + */ + public static final int QUIT_NET_VALUE = 38; + /** + * SAVING_AS_BUNDLE = 39; + */ + public static final int SAVING_AS_BUNDLE_VALUE = 39; + /** + * SAVED_AS_BUNDLE = 40; + */ + public static final int SAVED_AS_BUNDLE_VALUE = 40; + /** + * STOP_SAVING_AS_BUNDLE = 41; + */ + public static final int STOP_SAVING_AS_BUNDLE_VALUE = 41; + /** + * SAVE_DEFAULT_NOTE = 42; + */ + public static final int SAVE_DEFAULT_NOTE_VALUE = 42; + /** + * POST_FILE = 43; + */ + public static final int POST_FILE_VALUE = 43; + /** + * SAVE_DEFAULT_UI = 44; + */ + public static final int SAVE_DEFAULT_UI_VALUE = 44; + /** + * SET_FAVOR_AUDIO_MULTIPLIER = 45; + */ + public static final int SET_FAVOR_AUDIO_MULTIPLIER_VALUE = 45; + /** + * CALL_SITE_NET = 46; + */ + public static final int CALL_SITE_NET_VALUE = 46; + /** + * NOTIFY_YES = 47; + */ + public static final int NOTIFY_YES_VALUE = 47; + /** + * CALL_IO = 48; + */ + public static final int CALL_IO_VALUE = 48; + /** + * CALL_IO_COMPONENT = 49; + */ + public static final int CALL_IO_COMPONENT_VALUE = 49; + /** + * COMPILED_IO = 50; + */ + public static final int COMPILED_IO_VALUE = 50; + /** + * LEVY_IO = 51; + */ + public static final int LEVY_IO_VALUE = 51; + /** + * IO_INPUT = 52; + */ + public static final int IO_INPUT_VALUE = 52; + /** + * IO_JUDGE = 53; + */ + public static final int IO_JUDGE_VALUE = 53; + /** + * IO_NOTE_VISIBILITY = 54; + */ + public static final int IO_NOTE_VISIBILITY_VALUE = 54; + /** + * IO_JUDGMENT_METER = 56; + */ + public static final int IO_JUDGMENT_METER_VALUE = 56; + /** + * IO_MULTIPLIER = 57; + */ + public static final int IO_MULTIPLIER_VALUE = 57; + /** + * IO_AUDIO_MULTIPLIER = 58; + */ + public static final int IO_AUDIO_MULTIPLIER_VALUE = 58; + /** + * IO_PAUSE = 59; + */ + public static final int IO_PAUSE_VALUE = 59; + /** + * IO_QUIT = 60; + */ + public static final int IO_QUIT_VALUE = 60; + /** + * IO_NOT = 61; + */ + public static final int IO_NOT_VALUE = 61; + /** + * AUDIO_INPUT = 62; + */ + public static final int AUDIO_INPUT_VALUE = 62; + /** + * CALL_SITE_MODE_COMPONENT = 63; + */ + public static final int CALL_SITE_MODE_COMPONENT_VALUE = 63; + /** + * COMMENTARY = 65; + */ + public static final int COMMENTARY_VALUE = 65; + /** + * WWW_LEVEL = 66; + */ + public static final int WWW_LEVEL_VALUE = 66; + /** + * AVATAR_TITLE = 67; + */ + public static final int AVATAR_TITLE_VALUE = 67; + /** + * INVALIDATE_AVATAR_DRAWING = 68; + */ + public static final int INVALIDATE_AVATAR_DRAWING_VALUE = 68; + /** + * INVALIDATE_AVATAR_TITLE = 69; + */ + public static final int INVALIDATE_AVATAR_TITLE_VALUE = 69; + /** + * LEVEL_UP = 70; + */ + public static final int LEVEL_UP_VALUE = 70; + /** + * SET_FAVOR_NOTE_FILE = 71; + */ + public static final int SET_FAVOR_NOTE_FILE_VALUE = 71; + /** + * GET_SITE_YELLS = 72; + */ + public static final int GET_SITE_YELLS_VALUE = 72; + /** + * SET_LANGUAGE = 73; + */ + public static final int SET_LANGUAGE_VALUE = 73; + /** + * VALVE_COMMENT = 74; + */ + public static final int VALVE_COMMENT_VALUE = 74; + /** + * ABILITY_UP = 75; + */ + public static final int ABILITY_UP_VALUE = 75; + /** + * CLOSE = 76; + */ + public static final int CLOSE_VALUE = 76; + /** + * UNAVAILABLE_DATE = 77; + */ + public static final int UNAVAILABLE_DATE_VALUE = 77; + /** + * AVATAR_EDGE = 78; + */ + public static final int AVATAR_EDGE_VALUE = 78; + /** + * INVALIDATE_AVATAR_EDGE = 79; + */ + public static final int INVALIDATE_AVATAR_EDGE_VALUE = 79; + /** + * FAILED_VALIDATE_TOTEM = 80; + */ + public static final int FAILED_VALIDATE_TOTEM_VALUE = 80; + /** + * MODIFY_SITE_YELL = 81; + */ + public static final int MODIFY_SITE_YELL_VALUE = 81; + /** + * WIPE_SITE_YELL = 82; + */ + public static final int WIPE_SITE_YELL_VALUE = 82; + /** + * ALREADY_LOADING_BUNDLE = 83; + */ + public static final int ALREADY_LOADING_BUNDLE_VALUE = 83; + /** + * SET_FAVOR = 84; + */ + public static final int SET_FAVOR_VALUE = 84; + /** + * SET_AUTO_SITE_HAND = 85; + */ + public static final int SET_AUTO_SITE_HAND_VALUE = 85; + /** + * SET_AVATAR_GROUP = 86; + */ + public static final int SET_AVATAR_GROUP_VALUE = 86; + /** + * POST_ITEM = 87; + */ + public static final int POST_ITEM_VALUE = 87; + /** + * SET_VALID_NET_MODE = 88; + */ + public static final int SET_VALID_NET_MODE_VALUE = 88; + /** + * SET_ALLOWED_POSTABLE_ITEMS = 89; + */ + public static final int SET_ALLOWED_POSTABLE_ITEMS_VALUE = 89; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static EventID valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static EventID forNumber(int value) { + switch (value) { + case 0: return SIGN_IN; + case 1: return NOT_SIGN_IN; + case 2: return WARNING; + case 3: return SITE_YELL; + case 4: return CALL_BUNDLE; + case 5: return SAVE_AS_BUNDLE; + case 6: return SAVING_BUNDLE; + case 7: return WIPE_BUNDLE; + case 8: return SET_BUNDLE; + case 9: return CALL_UBUNTU; + case 10: return CALL_SITE_AVATAR; + case 11: return COMMENT; + case 12: return SET_SITUATION; + case 13: return NEW_TITLE; + case 14: return STOP_SAVING_BUNDLE; + case 15: return SAVED_BUNDLE; + case 16: return SAVE_BUNDLE; + case 17: return ENTER_SITE; + case 18: return QUIT_SITE; + case 19: return WIPE_UBUNTU; + case 20: return NEW_SITE; + case 21: return NEW_UBUNTU; + case 22: return EXILE_AVATAR; + case 23: return NEW_SILENT_SITE; + case 24: return ESTABLISH; + case 25: return CALL_CONFIGURE; + case 26: return SET_CONFIGURE; + case 27: return NOTIFY_INFO; + case 28: return LEVY_NET; + case 29: return COMPILED; + case 30: return CALL_NET; + case 31: return SET_MODE_COMPONENT; + case 32: return SET_FAVOR_MODE_COMPONENT; + case 33: return SET_VALID_HUNTER_MODE; + case 34: return CALL_NET_SITE_COMMENTS; + case 35: return SET_NOTE_FILE; + case 36: return SET_SITE_NAME; + case 37: return SET_SITE_HAND; + case 38: return QUIT_NET; + case 39: return SAVING_AS_BUNDLE; + case 40: return SAVED_AS_BUNDLE; + case 41: return STOP_SAVING_AS_BUNDLE; + case 42: return SAVE_DEFAULT_NOTE; + case 43: return POST_FILE; + case 44: return SAVE_DEFAULT_UI; + case 45: return SET_FAVOR_AUDIO_MULTIPLIER; + case 46: return CALL_SITE_NET; + case 47: return NOTIFY_YES; + case 48: return CALL_IO; + case 49: return CALL_IO_COMPONENT; + case 50: return COMPILED_IO; + case 51: return LEVY_IO; + case 52: return IO_INPUT; + case 53: return IO_JUDGE; + case 54: return IO_NOTE_VISIBILITY; + case 56: return IO_JUDGMENT_METER; + case 57: return IO_MULTIPLIER; + case 58: return IO_AUDIO_MULTIPLIER; + case 59: return IO_PAUSE; + case 60: return IO_QUIT; + case 61: return IO_NOT; + case 62: return AUDIO_INPUT; + case 63: return CALL_SITE_MODE_COMPONENT; + case 65: return COMMENTARY; + case 66: return WWW_LEVEL; + case 67: return AVATAR_TITLE; + case 68: return INVALIDATE_AVATAR_DRAWING; + case 69: return INVALIDATE_AVATAR_TITLE; + case 70: return LEVEL_UP; + case 71: return SET_FAVOR_NOTE_FILE; + case 72: return GET_SITE_YELLS; + case 73: return SET_LANGUAGE; + case 74: return VALVE_COMMENT; + case 75: return ABILITY_UP; + case 76: return CLOSE; + case 77: return UNAVAILABLE_DATE; + case 78: return AVATAR_EDGE; + case 79: return INVALIDATE_AVATAR_EDGE; + case 80: return FAILED_VALIDATE_TOTEM; + case 81: return MODIFY_SITE_YELL; + case 82: return WIPE_SITE_YELL; + case 83: return ALREADY_LOADING_BUNDLE; + case 84: return SET_FAVOR; + case 85: return SET_AUTO_SITE_HAND; + case 86: return SET_AVATAR_GROUP; + case 87: return POST_ITEM; + case 88: return SET_VALID_NET_MODE; + case 89: return SET_ALLOWED_POSTABLE_ITEMS; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + EventID> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public EventID findValueByNumber(int number) { + return EventID.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return net.taehui.EventClass.Event.getDescriptor().getEnumTypes().get(1); + } + + private static final EventID[] VALUES = values(); + + public static EventID valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private EventID(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:Event.EventID) + } + + public interface TwilightCallNetOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightCallNet) + com.google.protobuf.MessageOrBuilder { + + /** + * string handlerID = 1; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + java.util.List + getDataList(); + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem getData(int index); + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + int getDataCount(); + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + java.util.List + getDataOrBuilderList(); + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + net.taehui.EventClass.Event.TwilightCallNet.CallNetItemOrBuilder getDataOrBuilder( + int index); + } + /** + * Protobuf type {@code Event.TwilightCallNet} + */ + public static final class TwilightCallNet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightCallNet) + TwilightCallNetOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightCallNet.newBuilder() to construct. + private TwilightCallNet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightCallNet() { + handlerID_ = ""; + data_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightCallNet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightCallNet.class, net.taehui.EventClass.Event.TwilightCallNet.Builder.class); + } + + public interface CallNetItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightCallNet.CallNetItem) + com.google.protobuf.MessageOrBuilder { + + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @return The enum numeric value on the wire for avatarNetStatus. + */ + int getAvatarNetStatusValue(); + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @return The avatarNetStatus. + */ + net.taehui.EventClass.Event.AvatarNetStatus getAvatarNetStatus(); + + /** + * string avatarID = 2; + * @return The avatarID. + */ + java.lang.String getAvatarID(); + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + com.google.protobuf.ByteString + getAvatarIDBytes(); + + /** + * string avatarName = 3; + * @return The avatarName. + */ + java.lang.String getAvatarName(); + /** + * string avatarName = 3; + * @return The bytes for avatarName. + */ + com.google.protobuf.ByteString + getAvatarNameBytes(); + + /** + * int32 stand = 4; + * @return The stand. + */ + int getStand(); + + /** + * int32 band = 5; + * @return The band. + */ + int getBand(); + + /** + * double point = 6; + * @return The point. + */ + double getPoint(); + + /** + * double hitPoints = 7; + * @return The hitPoints. + */ + double getHitPoints(); + + /** + * bool isFailed = 8; + * @return The isFailed. + */ + boolean getIsFailed(); + + /** + * int32 lastJudged = 9; + * @return The lastJudged. + */ + int getLastJudged(); + + /** + * int32 hitPointsMode = 10; + * @return The hitPointsMode. + */ + int getHitPointsMode(); + + /** + * int32 targetPosition = 11; + * @return The targetPosition. + */ + int getTargetPosition(); + + /** + * repeated .Event.NetDrawing drawings = 12; + */ + java.util.List + getDrawingsList(); + /** + * repeated .Event.NetDrawing drawings = 12; + */ + net.taehui.EventClass.Event.NetDrawing getDrawings(int index); + /** + * repeated .Event.NetDrawing drawings = 12; + */ + int getDrawingsCount(); + /** + * repeated .Event.NetDrawing drawings = 12; + */ + java.util.List + getDrawingsOrBuilderList(); + /** + * repeated .Event.NetDrawing drawings = 12; + */ + net.taehui.EventClass.Event.NetDrawingOrBuilder getDrawingsOrBuilder( + int index); + + /** + * .Event.DrawingComponent drawingComponent = 13; + * @return Whether the drawingComponent field is set. + */ + boolean hasDrawingComponent(); + /** + * .Event.DrawingComponent drawingComponent = 13; + * @return The drawingComponent. + */ + net.taehui.EventClass.Event.DrawingComponent getDrawingComponent(); + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + net.taehui.EventClass.Event.DrawingComponentOrBuilder getDrawingComponentOrBuilder(); + } + /** + * Protobuf type {@code Event.TwilightCallNet.CallNetItem} + */ + public static final class CallNetItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightCallNet.CallNetItem) + CallNetItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use CallNetItem.newBuilder() to construct. + private CallNetItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CallNetItem() { + avatarNetStatus_ = 0; + avatarID_ = ""; + avatarName_ = ""; + drawings_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new CallNetItem(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_CallNetItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_CallNetItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.class, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder.class); + } + + private int bitField0_; + public static final int AVATARNETSTATUS_FIELD_NUMBER = 1; + private int avatarNetStatus_ = 0; + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @return The enum numeric value on the wire for avatarNetStatus. + */ + @java.lang.Override public int getAvatarNetStatusValue() { + return avatarNetStatus_; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @return The avatarNetStatus. + */ + @java.lang.Override public net.taehui.EventClass.Event.AvatarNetStatus getAvatarNetStatus() { + net.taehui.EventClass.Event.AvatarNetStatus result = net.taehui.EventClass.Event.AvatarNetStatus.forNumber(avatarNetStatus_); + return result == null ? net.taehui.EventClass.Event.AvatarNetStatus.UNRECOGNIZED : result; + } + + public static final int AVATARID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object avatarID_ = ""; + /** + * string avatarID = 2; + * @return The avatarID. + */ + @java.lang.Override + public java.lang.String getAvatarID() { + java.lang.Object ref = avatarID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarID_ = s; + return s; + } + } + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvatarIDBytes() { + java.lang.Object ref = avatarID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATARNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object avatarName_ = ""; + /** + * string avatarName = 3; + * @return The avatarName. + */ + @java.lang.Override + public java.lang.String getAvatarName() { + java.lang.Object ref = avatarName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarName_ = s; + return s; + } + } + /** + * string avatarName = 3; + * @return The bytes for avatarName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvatarNameBytes() { + java.lang.Object ref = avatarName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STAND_FIELD_NUMBER = 4; + private int stand_ = 0; + /** + * int32 stand = 4; + * @return The stand. + */ + @java.lang.Override + public int getStand() { + return stand_; + } + + public static final int BAND_FIELD_NUMBER = 5; + private int band_ = 0; + /** + * int32 band = 5; + * @return The band. + */ + @java.lang.Override + public int getBand() { + return band_; + } + + public static final int POINT_FIELD_NUMBER = 6; + private double point_ = 0D; + /** + * double point = 6; + * @return The point. + */ + @java.lang.Override + public double getPoint() { + return point_; + } + + public static final int HITPOINTS_FIELD_NUMBER = 7; + private double hitPoints_ = 0D; + /** + * double hitPoints = 7; + * @return The hitPoints. + */ + @java.lang.Override + public double getHitPoints() { + return hitPoints_; + } + + public static final int ISFAILED_FIELD_NUMBER = 8; + private boolean isFailed_ = false; + /** + * bool isFailed = 8; + * @return The isFailed. + */ + @java.lang.Override + public boolean getIsFailed() { + return isFailed_; + } + + public static final int LASTJUDGED_FIELD_NUMBER = 9; + private int lastJudged_ = 0; + /** + * int32 lastJudged = 9; + * @return The lastJudged. + */ + @java.lang.Override + public int getLastJudged() { + return lastJudged_; + } + + public static final int HITPOINTSMODE_FIELD_NUMBER = 10; + private int hitPointsMode_ = 0; + /** + * int32 hitPointsMode = 10; + * @return The hitPointsMode. + */ + @java.lang.Override + public int getHitPointsMode() { + return hitPointsMode_; + } + + public static final int TARGETPOSITION_FIELD_NUMBER = 11; + private int targetPosition_ = 0; + /** + * int32 targetPosition = 11; + * @return The targetPosition. + */ + @java.lang.Override + public int getTargetPosition() { + return targetPosition_; + } + + public static final int DRAWINGS_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private java.util.List drawings_; + /** + * repeated .Event.NetDrawing drawings = 12; + */ + @java.lang.Override + public java.util.List getDrawingsList() { + return drawings_; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + @java.lang.Override + public java.util.List + getDrawingsOrBuilderList() { + return drawings_; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + @java.lang.Override + public int getDrawingsCount() { + return drawings_.size(); + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawing getDrawings(int index) { + return drawings_.get(index); + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawingOrBuilder getDrawingsOrBuilder( + int index) { + return drawings_.get(index); + } + + public static final int DRAWINGCOMPONENT_FIELD_NUMBER = 13; + private net.taehui.EventClass.Event.DrawingComponent drawingComponent_; + /** + * .Event.DrawingComponent drawingComponent = 13; + * @return Whether the drawingComponent field is set. + */ + @java.lang.Override + public boolean hasDrawingComponent() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Event.DrawingComponent drawingComponent = 13; + * @return The drawingComponent. + */ + @java.lang.Override + public net.taehui.EventClass.Event.DrawingComponent getDrawingComponent() { + return drawingComponent_ == null ? net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance() : drawingComponent_; + } + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + @java.lang.Override + public net.taehui.EventClass.Event.DrawingComponentOrBuilder getDrawingComponentOrBuilder() { + return drawingComponent_ == null ? net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance() : drawingComponent_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (avatarNetStatus_ != net.taehui.EventClass.Event.AvatarNetStatus.Default.getNumber()) { + output.writeEnum(1, avatarNetStatus_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, avatarID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, avatarName_); + } + if (stand_ != 0) { + output.writeInt32(4, stand_); + } + if (band_ != 0) { + output.writeInt32(5, band_); + } + if (java.lang.Double.doubleToRawLongBits(point_) != 0) { + output.writeDouble(6, point_); + } + if (java.lang.Double.doubleToRawLongBits(hitPoints_) != 0) { + output.writeDouble(7, hitPoints_); + } + if (isFailed_ != false) { + output.writeBool(8, isFailed_); + } + if (lastJudged_ != 0) { + output.writeInt32(9, lastJudged_); + } + if (hitPointsMode_ != 0) { + output.writeInt32(10, hitPointsMode_); + } + if (targetPosition_ != 0) { + output.writeInt32(11, targetPosition_); + } + for (int i = 0; i < drawings_.size(); i++) { + output.writeMessage(12, drawings_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(13, getDrawingComponent()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (avatarNetStatus_ != net.taehui.EventClass.Event.AvatarNetStatus.Default.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, avatarNetStatus_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, avatarID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, avatarName_); + } + if (stand_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, stand_); + } + if (band_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, band_); + } + if (java.lang.Double.doubleToRawLongBits(point_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, point_); + } + if (java.lang.Double.doubleToRawLongBits(hitPoints_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(7, hitPoints_); + } + if (isFailed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, isFailed_); + } + if (lastJudged_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, lastJudged_); + } + if (hitPointsMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(10, hitPointsMode_); + } + if (targetPosition_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(11, targetPosition_); + } + for (int i = 0; i < drawings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, drawings_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getDrawingComponent()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightCallNet.CallNetItem)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem other = (net.taehui.EventClass.Event.TwilightCallNet.CallNetItem) obj; + + if (avatarNetStatus_ != other.avatarNetStatus_) return false; + if (!getAvatarID() + .equals(other.getAvatarID())) return false; + if (!getAvatarName() + .equals(other.getAvatarName())) return false; + if (getStand() + != other.getStand()) return false; + if (getBand() + != other.getBand()) return false; + if (java.lang.Double.doubleToLongBits(getPoint()) + != java.lang.Double.doubleToLongBits( + other.getPoint())) return false; + if (java.lang.Double.doubleToLongBits(getHitPoints()) + != java.lang.Double.doubleToLongBits( + other.getHitPoints())) return false; + if (getIsFailed() + != other.getIsFailed()) return false; + if (getLastJudged() + != other.getLastJudged()) return false; + if (getHitPointsMode() + != other.getHitPointsMode()) return false; + if (getTargetPosition() + != other.getTargetPosition()) return false; + if (!getDrawingsList() + .equals(other.getDrawingsList())) return false; + if (hasDrawingComponent() != other.hasDrawingComponent()) return false; + if (hasDrawingComponent()) { + if (!getDrawingComponent() + .equals(other.getDrawingComponent())) return false; + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + AVATARNETSTATUS_FIELD_NUMBER; + hash = (53 * hash) + avatarNetStatus_; + hash = (37 * hash) + AVATARID_FIELD_NUMBER; + hash = (53 * hash) + getAvatarID().hashCode(); + hash = (37 * hash) + AVATARNAME_FIELD_NUMBER; + hash = (53 * hash) + getAvatarName().hashCode(); + hash = (37 * hash) + STAND_FIELD_NUMBER; + hash = (53 * hash) + getStand(); + hash = (37 * hash) + BAND_FIELD_NUMBER; + hash = (53 * hash) + getBand(); + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPoint())); + hash = (37 * hash) + HITPOINTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHitPoints())); + hash = (37 * hash) + ISFAILED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFailed()); + hash = (37 * hash) + LASTJUDGED_FIELD_NUMBER; + hash = (53 * hash) + getLastJudged(); + hash = (37 * hash) + HITPOINTSMODE_FIELD_NUMBER; + hash = (53 * hash) + getHitPointsMode(); + hash = (37 * hash) + TARGETPOSITION_FIELD_NUMBER; + hash = (53 * hash) + getTargetPosition(); + if (getDrawingsCount() > 0) { + hash = (37 * hash) + DRAWINGS_FIELD_NUMBER; + hash = (53 * hash) + getDrawingsList().hashCode(); + } + if (hasDrawingComponent()) { + hash = (37 * hash) + DRAWINGCOMPONENT_FIELD_NUMBER; + hash = (53 * hash) + getDrawingComponent().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightCallNet.CallNetItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightCallNet.CallNetItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightCallNet.CallNetItem) + net.taehui.EventClass.Event.TwilightCallNet.CallNetItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_CallNetItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_CallNetItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.class, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDrawingsFieldBuilder(); + getDrawingComponentFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatarNetStatus_ = 0; + avatarID_ = ""; + avatarName_ = ""; + stand_ = 0; + band_ = 0; + point_ = 0D; + hitPoints_ = 0D; + isFailed_ = false; + lastJudged_ = 0; + hitPointsMode_ = 0; + targetPosition_ = 0; + if (drawingsBuilder_ == null) { + drawings_ = java.util.Collections.emptyList(); + } else { + drawings_ = null; + drawingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000800); + drawingComponent_ = null; + if (drawingComponentBuilder_ != null) { + drawingComponentBuilder_.dispose(); + drawingComponentBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_CallNetItem_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem build() { + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem buildPartial() { + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem result = new net.taehui.EventClass.Event.TwilightCallNet.CallNetItem(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(net.taehui.EventClass.Event.TwilightCallNet.CallNetItem result) { + if (drawingsBuilder_ == null) { + if (((bitField0_ & 0x00000800) != 0)) { + drawings_ = java.util.Collections.unmodifiableList(drawings_); + bitField0_ = (bitField0_ & ~0x00000800); + } + result.drawings_ = drawings_; + } else { + result.drawings_ = drawingsBuilder_.build(); + } + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightCallNet.CallNetItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.avatarNetStatus_ = avatarNetStatus_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.avatarID_ = avatarID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.avatarName_ = avatarName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.stand_ = stand_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.band_ = band_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.point_ = point_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.hitPoints_ = hitPoints_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.isFailed_ = isFailed_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.lastJudged_ = lastJudged_; + } + if (((from_bitField0_ & 0x00000200) != 0)) { + result.hitPointsMode_ = hitPointsMode_; + } + if (((from_bitField0_ & 0x00000400) != 0)) { + result.targetPosition_ = targetPosition_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00001000) != 0)) { + result.drawingComponent_ = drawingComponentBuilder_ == null + ? drawingComponent_ + : drawingComponentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightCallNet.CallNetItem) { + return mergeFrom((net.taehui.EventClass.Event.TwilightCallNet.CallNetItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightCallNet.CallNetItem other) { + if (other == net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.getDefaultInstance()) return this; + if (other.avatarNetStatus_ != 0) { + setAvatarNetStatusValue(other.getAvatarNetStatusValue()); + } + if (!other.getAvatarID().isEmpty()) { + avatarID_ = other.avatarID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (!other.getAvatarName().isEmpty()) { + avatarName_ = other.avatarName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getStand() != 0) { + setStand(other.getStand()); + } + if (other.getBand() != 0) { + setBand(other.getBand()); + } + if (other.getPoint() != 0D) { + setPoint(other.getPoint()); + } + if (other.getHitPoints() != 0D) { + setHitPoints(other.getHitPoints()); + } + if (other.getIsFailed() != false) { + setIsFailed(other.getIsFailed()); + } + if (other.getLastJudged() != 0) { + setLastJudged(other.getLastJudged()); + } + if (other.getHitPointsMode() != 0) { + setHitPointsMode(other.getHitPointsMode()); + } + if (other.getTargetPosition() != 0) { + setTargetPosition(other.getTargetPosition()); + } + if (drawingsBuilder_ == null) { + if (!other.drawings_.isEmpty()) { + if (drawings_.isEmpty()) { + drawings_ = other.drawings_; + bitField0_ = (bitField0_ & ~0x00000800); + } else { + ensureDrawingsIsMutable(); + drawings_.addAll(other.drawings_); + } + onChanged(); + } + } else { + if (!other.drawings_.isEmpty()) { + if (drawingsBuilder_.isEmpty()) { + drawingsBuilder_.dispose(); + drawingsBuilder_ = null; + drawings_ = other.drawings_; + bitField0_ = (bitField0_ & ~0x00000800); + drawingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDrawingsFieldBuilder() : null; + } else { + drawingsBuilder_.addAllMessages(other.drawings_); + } + } + } + if (other.hasDrawingComponent()) { + mergeDrawingComponent(other.getDrawingComponent()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + avatarNetStatus_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + avatarID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + avatarName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 32: { + stand_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + band_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 49: { + point_ = input.readDouble(); + bitField0_ |= 0x00000020; + break; + } // case 49 + case 57: { + hitPoints_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 57 + case 64: { + isFailed_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + lastJudged_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 80: { + hitPointsMode_ = input.readInt32(); + bitField0_ |= 0x00000200; + break; + } // case 80 + case 88: { + targetPosition_ = input.readInt32(); + bitField0_ |= 0x00000400; + break; + } // case 88 + case 98: { + net.taehui.EventClass.Event.NetDrawing m = + input.readMessage( + net.taehui.EventClass.Event.NetDrawing.parser(), + extensionRegistry); + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.add(m); + } else { + drawingsBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: { + input.readMessage( + getDrawingComponentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00001000; + break; + } // case 106 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int avatarNetStatus_ = 0; + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @return The enum numeric value on the wire for avatarNetStatus. + */ + @java.lang.Override public int getAvatarNetStatusValue() { + return avatarNetStatus_; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @param value The enum numeric value on the wire for avatarNetStatus to set. + * @return This builder for chaining. + */ + public Builder setAvatarNetStatusValue(int value) { + avatarNetStatus_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @return The avatarNetStatus. + */ + @java.lang.Override + public net.taehui.EventClass.Event.AvatarNetStatus getAvatarNetStatus() { + net.taehui.EventClass.Event.AvatarNetStatus result = net.taehui.EventClass.Event.AvatarNetStatus.forNumber(avatarNetStatus_); + return result == null ? net.taehui.EventClass.Event.AvatarNetStatus.UNRECOGNIZED : result; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @param value The avatarNetStatus to set. + * @return This builder for chaining. + */ + public Builder setAvatarNetStatus(net.taehui.EventClass.Event.AvatarNetStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + avatarNetStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 1; + * @return This builder for chaining. + */ + public Builder clearAvatarNetStatus() { + bitField0_ = (bitField0_ & ~0x00000001); + avatarNetStatus_ = 0; + onChanged(); + return this; + } + + private java.lang.Object avatarID_ = ""; + /** + * string avatarID = 2; + * @return The avatarID. + */ + public java.lang.String getAvatarID() { + java.lang.Object ref = avatarID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + public com.google.protobuf.ByteString + getAvatarIDBytes() { + java.lang.Object ref = avatarID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string avatarID = 2; + * @param value The avatarID to set. + * @return This builder for chaining. + */ + public Builder setAvatarID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avatarID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string avatarID = 2; + * @return This builder for chaining. + */ + public Builder clearAvatarID() { + avatarID_ = getDefaultInstance().getAvatarID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string avatarID = 2; + * @param value The bytes for avatarID to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatarID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private java.lang.Object avatarName_ = ""; + /** + * string avatarName = 3; + * @return The avatarName. + */ + public java.lang.String getAvatarName() { + java.lang.Object ref = avatarName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string avatarName = 3; + * @return The bytes for avatarName. + */ + public com.google.protobuf.ByteString + getAvatarNameBytes() { + java.lang.Object ref = avatarName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string avatarName = 3; + * @param value The avatarName to set. + * @return This builder for chaining. + */ + public Builder setAvatarName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avatarName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string avatarName = 3; + * @return This builder for chaining. + */ + public Builder clearAvatarName() { + avatarName_ = getDefaultInstance().getAvatarName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string avatarName = 3; + * @param value The bytes for avatarName to set. + * @return This builder for chaining. + */ + public Builder setAvatarNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatarName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private int stand_ ; + /** + * int32 stand = 4; + * @return The stand. + */ + @java.lang.Override + public int getStand() { + return stand_; + } + /** + * int32 stand = 4; + * @param value The stand to set. + * @return This builder for chaining. + */ + public Builder setStand(int value) { + + stand_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 stand = 4; + * @return This builder for chaining. + */ + public Builder clearStand() { + bitField0_ = (bitField0_ & ~0x00000008); + stand_ = 0; + onChanged(); + return this; + } + + private int band_ ; + /** + * int32 band = 5; + * @return The band. + */ + @java.lang.Override + public int getBand() { + return band_; + } + /** + * int32 band = 5; + * @param value The band to set. + * @return This builder for chaining. + */ + public Builder setBand(int value) { + + band_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 band = 5; + * @return This builder for chaining. + */ + public Builder clearBand() { + bitField0_ = (bitField0_ & ~0x00000010); + band_ = 0; + onChanged(); + return this; + } + + private double point_ ; + /** + * double point = 6; + * @return The point. + */ + @java.lang.Override + public double getPoint() { + return point_; + } + /** + * double point = 6; + * @param value The point to set. + * @return This builder for chaining. + */ + public Builder setPoint(double value) { + + point_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * double point = 6; + * @return This builder for chaining. + */ + public Builder clearPoint() { + bitField0_ = (bitField0_ & ~0x00000020); + point_ = 0D; + onChanged(); + return this; + } + + private double hitPoints_ ; + /** + * double hitPoints = 7; + * @return The hitPoints. + */ + @java.lang.Override + public double getHitPoints() { + return hitPoints_; + } + /** + * double hitPoints = 7; + * @param value The hitPoints to set. + * @return This builder for chaining. + */ + public Builder setHitPoints(double value) { + + hitPoints_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * double hitPoints = 7; + * @return This builder for chaining. + */ + public Builder clearHitPoints() { + bitField0_ = (bitField0_ & ~0x00000040); + hitPoints_ = 0D; + onChanged(); + return this; + } + + private boolean isFailed_ ; + /** + * bool isFailed = 8; + * @return The isFailed. + */ + @java.lang.Override + public boolean getIsFailed() { + return isFailed_; + } + /** + * bool isFailed = 8; + * @param value The isFailed to set. + * @return This builder for chaining. + */ + public Builder setIsFailed(boolean value) { + + isFailed_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * bool isFailed = 8; + * @return This builder for chaining. + */ + public Builder clearIsFailed() { + bitField0_ = (bitField0_ & ~0x00000080); + isFailed_ = false; + onChanged(); + return this; + } + + private int lastJudged_ ; + /** + * int32 lastJudged = 9; + * @return The lastJudged. + */ + @java.lang.Override + public int getLastJudged() { + return lastJudged_; + } + /** + * int32 lastJudged = 9; + * @param value The lastJudged to set. + * @return This builder for chaining. + */ + public Builder setLastJudged(int value) { + + lastJudged_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int32 lastJudged = 9; + * @return This builder for chaining. + */ + public Builder clearLastJudged() { + bitField0_ = (bitField0_ & ~0x00000100); + lastJudged_ = 0; + onChanged(); + return this; + } + + private int hitPointsMode_ ; + /** + * int32 hitPointsMode = 10; + * @return The hitPointsMode. + */ + @java.lang.Override + public int getHitPointsMode() { + return hitPointsMode_; + } + /** + * int32 hitPointsMode = 10; + * @param value The hitPointsMode to set. + * @return This builder for chaining. + */ + public Builder setHitPointsMode(int value) { + + hitPointsMode_ = value; + bitField0_ |= 0x00000200; + onChanged(); + return this; + } + /** + * int32 hitPointsMode = 10; + * @return This builder for chaining. + */ + public Builder clearHitPointsMode() { + bitField0_ = (bitField0_ & ~0x00000200); + hitPointsMode_ = 0; + onChanged(); + return this; + } + + private int targetPosition_ ; + /** + * int32 targetPosition = 11; + * @return The targetPosition. + */ + @java.lang.Override + public int getTargetPosition() { + return targetPosition_; + } + /** + * int32 targetPosition = 11; + * @param value The targetPosition to set. + * @return This builder for chaining. + */ + public Builder setTargetPosition(int value) { + + targetPosition_ = value; + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * int32 targetPosition = 11; + * @return This builder for chaining. + */ + public Builder clearTargetPosition() { + bitField0_ = (bitField0_ & ~0x00000400); + targetPosition_ = 0; + onChanged(); + return this; + } + + private java.util.List drawings_ = + java.util.Collections.emptyList(); + private void ensureDrawingsIsMutable() { + if (!((bitField0_ & 0x00000800) != 0)) { + drawings_ = new java.util.ArrayList(drawings_); + bitField0_ |= 0x00000800; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.NetDrawing, net.taehui.EventClass.Event.NetDrawing.Builder, net.taehui.EventClass.Event.NetDrawingOrBuilder> drawingsBuilder_; + + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public java.util.List getDrawingsList() { + if (drawingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(drawings_); + } else { + return drawingsBuilder_.getMessageList(); + } + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public int getDrawingsCount() { + if (drawingsBuilder_ == null) { + return drawings_.size(); + } else { + return drawingsBuilder_.getCount(); + } + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public net.taehui.EventClass.Event.NetDrawing getDrawings(int index) { + if (drawingsBuilder_ == null) { + return drawings_.get(index); + } else { + return drawingsBuilder_.getMessage(index); + } + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder setDrawings( + int index, net.taehui.EventClass.Event.NetDrawing value) { + if (drawingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDrawingsIsMutable(); + drawings_.set(index, value); + onChanged(); + } else { + drawingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder setDrawings( + int index, net.taehui.EventClass.Event.NetDrawing.Builder builderForValue) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.set(index, builderForValue.build()); + onChanged(); + } else { + drawingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder addDrawings(net.taehui.EventClass.Event.NetDrawing value) { + if (drawingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDrawingsIsMutable(); + drawings_.add(value); + onChanged(); + } else { + drawingsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder addDrawings( + int index, net.taehui.EventClass.Event.NetDrawing value) { + if (drawingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDrawingsIsMutable(); + drawings_.add(index, value); + onChanged(); + } else { + drawingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder addDrawings( + net.taehui.EventClass.Event.NetDrawing.Builder builderForValue) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.add(builderForValue.build()); + onChanged(); + } else { + drawingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder addDrawings( + int index, net.taehui.EventClass.Event.NetDrawing.Builder builderForValue) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.add(index, builderForValue.build()); + onChanged(); + } else { + drawingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder addAllDrawings( + java.lang.Iterable values) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, drawings_); + onChanged(); + } else { + drawingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder clearDrawings() { + if (drawingsBuilder_ == null) { + drawings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + } else { + drawingsBuilder_.clear(); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public Builder removeDrawings(int index) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.remove(index); + onChanged(); + } else { + drawingsBuilder_.remove(index); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public net.taehui.EventClass.Event.NetDrawing.Builder getDrawingsBuilder( + int index) { + return getDrawingsFieldBuilder().getBuilder(index); + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public net.taehui.EventClass.Event.NetDrawingOrBuilder getDrawingsOrBuilder( + int index) { + if (drawingsBuilder_ == null) { + return drawings_.get(index); } else { + return drawingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public java.util.List + getDrawingsOrBuilderList() { + if (drawingsBuilder_ != null) { + return drawingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(drawings_); + } + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public net.taehui.EventClass.Event.NetDrawing.Builder addDrawingsBuilder() { + return getDrawingsFieldBuilder().addBuilder( + net.taehui.EventClass.Event.NetDrawing.getDefaultInstance()); + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public net.taehui.EventClass.Event.NetDrawing.Builder addDrawingsBuilder( + int index) { + return getDrawingsFieldBuilder().addBuilder( + index, net.taehui.EventClass.Event.NetDrawing.getDefaultInstance()); + } + /** + * repeated .Event.NetDrawing drawings = 12; + */ + public java.util.List + getDrawingsBuilderList() { + return getDrawingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.NetDrawing, net.taehui.EventClass.Event.NetDrawing.Builder, net.taehui.EventClass.Event.NetDrawingOrBuilder> + getDrawingsFieldBuilder() { + if (drawingsBuilder_ == null) { + drawingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.NetDrawing, net.taehui.EventClass.Event.NetDrawing.Builder, net.taehui.EventClass.Event.NetDrawingOrBuilder>( + drawings_, + ((bitField0_ & 0x00000800) != 0), + getParentForChildren(), + isClean()); + drawings_ = null; + } + return drawingsBuilder_; + } + + private net.taehui.EventClass.Event.DrawingComponent drawingComponent_; + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.DrawingComponent, net.taehui.EventClass.Event.DrawingComponent.Builder, net.taehui.EventClass.Event.DrawingComponentOrBuilder> drawingComponentBuilder_; + /** + * .Event.DrawingComponent drawingComponent = 13; + * @return Whether the drawingComponent field is set. + */ + public boolean hasDrawingComponent() { + return ((bitField0_ & 0x00001000) != 0); + } + /** + * .Event.DrawingComponent drawingComponent = 13; + * @return The drawingComponent. + */ + public net.taehui.EventClass.Event.DrawingComponent getDrawingComponent() { + if (drawingComponentBuilder_ == null) { + return drawingComponent_ == null ? net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance() : drawingComponent_; + } else { + return drawingComponentBuilder_.getMessage(); + } + } + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + public Builder setDrawingComponent(net.taehui.EventClass.Event.DrawingComponent value) { + if (drawingComponentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + drawingComponent_ = value; + } else { + drawingComponentBuilder_.setMessage(value); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + public Builder setDrawingComponent( + net.taehui.EventClass.Event.DrawingComponent.Builder builderForValue) { + if (drawingComponentBuilder_ == null) { + drawingComponent_ = builderForValue.build(); + } else { + drawingComponentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + public Builder mergeDrawingComponent(net.taehui.EventClass.Event.DrawingComponent value) { + if (drawingComponentBuilder_ == null) { + if (((bitField0_ & 0x00001000) != 0) && + drawingComponent_ != null && + drawingComponent_ != net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance()) { + getDrawingComponentBuilder().mergeFrom(value); + } else { + drawingComponent_ = value; + } + } else { + drawingComponentBuilder_.mergeFrom(value); + } + if (drawingComponent_ != null) { + bitField0_ |= 0x00001000; + onChanged(); + } + return this; + } + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + public Builder clearDrawingComponent() { + bitField0_ = (bitField0_ & ~0x00001000); + drawingComponent_ = null; + if (drawingComponentBuilder_ != null) { + drawingComponentBuilder_.dispose(); + drawingComponentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + public net.taehui.EventClass.Event.DrawingComponent.Builder getDrawingComponentBuilder() { + bitField0_ |= 0x00001000; + onChanged(); + return getDrawingComponentFieldBuilder().getBuilder(); + } + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + public net.taehui.EventClass.Event.DrawingComponentOrBuilder getDrawingComponentOrBuilder() { + if (drawingComponentBuilder_ != null) { + return drawingComponentBuilder_.getMessageOrBuilder(); + } else { + return drawingComponent_ == null ? + net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance() : drawingComponent_; + } + } + /** + * .Event.DrawingComponent drawingComponent = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.DrawingComponent, net.taehui.EventClass.Event.DrawingComponent.Builder, net.taehui.EventClass.Event.DrawingComponentOrBuilder> + getDrawingComponentFieldBuilder() { + if (drawingComponentBuilder_ == null) { + drawingComponentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.DrawingComponent, net.taehui.EventClass.Event.DrawingComponent.Builder, net.taehui.EventClass.Event.DrawingComponentOrBuilder>( + getDrawingComponent(), + getParentForChildren(), + isClean()); + drawingComponent_ = null; + } + return drawingComponentBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightCallNet.CallNetItem) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightCallNet.CallNetItem) + private static final net.taehui.EventClass.Event.TwilightCallNet.CallNetItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightCallNet.CallNetItem(); + } + + public static net.taehui.EventClass.Event.TwilightCallNet.CallNetItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CallNetItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int HANDLERID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private java.util.List data_; + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + @java.lang.Override + public java.util.List getDataList() { + return data_; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + @java.lang.Override + public java.util.List + getDataOrBuilderList() { + return data_; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + @java.lang.Override + public int getDataCount() { + return data_.size(); + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem getData(int index) { + return data_.get(index); + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItemOrBuilder getDataOrBuilder( + int index) { + return data_.get(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, handlerID_); + } + for (int i = 0; i < data_.size(); i++) { + output.writeMessage(2, data_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, handlerID_); + } + for (int i = 0; i < data_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, data_.get(i)); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightCallNet)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightCallNet other = (net.taehui.EventClass.Event.TwilightCallNet) obj; + + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (!getDataList() + .equals(other.getDataList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + if (getDataCount() > 0) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getDataList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightCallNet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightCallNet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightCallNet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightCallNet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightCallNet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightCallNet) + net.taehui.EventClass.Event.TwilightCallNetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightCallNet.class, net.taehui.EventClass.Event.TwilightCallNet.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightCallNet.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + handlerID_ = ""; + if (dataBuilder_ == null) { + data_ = java.util.Collections.emptyList(); + } else { + data_ = null; + dataBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightCallNet_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet build() { + net.taehui.EventClass.Event.TwilightCallNet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet buildPartial() { + net.taehui.EventClass.Event.TwilightCallNet result = new net.taehui.EventClass.Event.TwilightCallNet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(net.taehui.EventClass.Event.TwilightCallNet result) { + if (dataBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + data_ = java.util.Collections.unmodifiableList(data_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.data_ = data_; + } else { + result.data_ = dataBuilder_.build(); + } + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightCallNet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.handlerID_ = handlerID_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightCallNet) { + return mergeFrom((net.taehui.EventClass.Event.TwilightCallNet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightCallNet other) { + if (other == net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance()) return this; + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (dataBuilder_ == null) { + if (!other.data_.isEmpty()) { + if (data_.isEmpty()) { + data_ = other.data_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDataIsMutable(); + data_.addAll(other.data_); + } + onChanged(); + } + } else { + if (!other.data_.isEmpty()) { + if (dataBuilder_.isEmpty()) { + dataBuilder_.dispose(); + dataBuilder_ = null; + data_ = other.data_; + bitField0_ = (bitField0_ & ~0x00000002); + dataBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDataFieldBuilder() : null; + } else { + dataBuilder_.addAllMessages(other.data_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem m = + input.readMessage( + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.parser(), + extensionRegistry); + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.add(m); + } else { + dataBuilder_.addMessage(m); + } + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 1; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.util.List data_ = + java.util.Collections.emptyList(); + private void ensureDataIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + data_ = new java.util.ArrayList(data_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder, net.taehui.EventClass.Event.TwilightCallNet.CallNetItemOrBuilder> dataBuilder_; + + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public java.util.List getDataList() { + if (dataBuilder_ == null) { + return java.util.Collections.unmodifiableList(data_); + } else { + return dataBuilder_.getMessageList(); + } + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public int getDataCount() { + if (dataBuilder_ == null) { + return data_.size(); + } else { + return dataBuilder_.getCount(); + } + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem getData(int index) { + if (dataBuilder_ == null) { + return data_.get(index); + } else { + return dataBuilder_.getMessage(index); + } + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder setData( + int index, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataIsMutable(); + data_.set(index, value); + onChanged(); + } else { + dataBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder setData( + int index, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder builderForValue) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.set(index, builderForValue.build()); + onChanged(); + } else { + dataBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder addData(net.taehui.EventClass.Event.TwilightCallNet.CallNetItem value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataIsMutable(); + data_.add(value); + onChanged(); + } else { + dataBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder addData( + int index, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem value) { + if (dataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDataIsMutable(); + data_.add(index, value); + onChanged(); + } else { + dataBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder addData( + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder builderForValue) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.add(builderForValue.build()); + onChanged(); + } else { + dataBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder addData( + int index, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder builderForValue) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.add(index, builderForValue.build()); + onChanged(); + } else { + dataBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder addAllData( + java.lang.Iterable values) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, data_); + onChanged(); + } else { + dataBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder clearData() { + if (dataBuilder_ == null) { + data_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + dataBuilder_.clear(); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public Builder removeData(int index) { + if (dataBuilder_ == null) { + ensureDataIsMutable(); + data_.remove(index); + onChanged(); + } else { + dataBuilder_.remove(index); + } + return this; + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder getDataBuilder( + int index) { + return getDataFieldBuilder().getBuilder(index); + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItemOrBuilder getDataOrBuilder( + int index) { + if (dataBuilder_ == null) { + return data_.get(index); } else { + return dataBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public java.util.List + getDataOrBuilderList() { + if (dataBuilder_ != null) { + return dataBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(data_); + } + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder addDataBuilder() { + return getDataFieldBuilder().addBuilder( + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.getDefaultInstance()); + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder addDataBuilder( + int index) { + return getDataFieldBuilder().addBuilder( + index, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.getDefaultInstance()); + } + /** + * repeated .Event.TwilightCallNet.CallNetItem data = 2; + */ + public java.util.List + getDataBuilderList() { + return getDataFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder, net.taehui.EventClass.Event.TwilightCallNet.CallNetItemOrBuilder> + getDataFieldBuilder() { + if (dataBuilder_ == null) { + dataBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.TwilightCallNet.CallNetItem, net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder, net.taehui.EventClass.Event.TwilightCallNet.CallNetItemOrBuilder>( + data_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + data_ = null; + } + return dataBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightCallNet) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightCallNet) + private static final net.taehui.EventClass.Event.TwilightCallNet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightCallNet(); + } + + public static net.taehui.EventClass.Event.TwilightCallNet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightCallNet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QwilightCallNetOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.QwilightCallNet) + com.google.protobuf.MessageOrBuilder { + + /** + * string siteID = 1; + * @return The siteID. + */ + java.lang.String getSiteID(); + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + com.google.protobuf.ByteString + getSiteIDBytes(); + + /** + * string handlerID = 2; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @return The enum numeric value on the wire for avatarNetStatus. + */ + int getAvatarNetStatusValue(); + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @return The avatarNetStatus. + */ + net.taehui.EventClass.Event.AvatarNetStatus getAvatarNetStatus(); + + /** + * int32 stand = 4; + * @return The stand. + */ + int getStand(); + + /** + * int32 highestBand = 5; + * @return The highestBand. + */ + int getHighestBand(); + + /** + * double point = 6; + * @return The point. + */ + double getPoint(); + + /** + * double hitPoints = 7; + * @return The hitPoints. + */ + double getHitPoints(); + + /** + * bool isFailed = 8; + * @return The isFailed. + */ + boolean getIsFailed(); + + /** + * int32 lastJudged = 9; + * @return The lastJudged. + */ + int getLastJudged(); + + /** + * repeated .Event.NetDrawing drawings = 10; + */ + java.util.List + getDrawingsList(); + /** + * repeated .Event.NetDrawing drawings = 10; + */ + net.taehui.EventClass.Event.NetDrawing getDrawings(int index); + /** + * repeated .Event.NetDrawing drawings = 10; + */ + int getDrawingsCount(); + /** + * repeated .Event.NetDrawing drawings = 10; + */ + java.util.List + getDrawingsOrBuilderList(); + /** + * repeated .Event.NetDrawing drawings = 10; + */ + net.taehui.EventClass.Event.NetDrawingOrBuilder getDrawingsOrBuilder( + int index); + + /** + * .Event.DrawingComponent drawingComponent = 11; + * @return Whether the drawingComponent field is set. + */ + boolean hasDrawingComponent(); + /** + * .Event.DrawingComponent drawingComponent = 11; + * @return The drawingComponent. + */ + net.taehui.EventClass.Event.DrawingComponent getDrawingComponent(); + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + net.taehui.EventClass.Event.DrawingComponentOrBuilder getDrawingComponentOrBuilder(); + + /** + * string title = 12; + * @return The title. + */ + java.lang.String getTitle(); + /** + * string title = 12; + * @return The bytes for title. + */ + com.google.protobuf.ByteString + getTitleBytes(); + + /** + * string artist = 13; + * @return The artist. + */ + java.lang.String getArtist(); + /** + * string artist = 13; + * @return The bytes for artist. + */ + com.google.protobuf.ByteString + getArtistBytes(); + + /** + * string genre = 14; + * @return The genre. + */ + java.lang.String getGenre(); + /** + * string genre = 14; + * @return The bytes for genre. + */ + com.google.protobuf.ByteString + getGenreBytes(); + + /** + * int32 level = 15; + * @return The level. + */ + int getLevel(); + + /** + * string levelText = 16; + * @return The levelText. + */ + java.lang.String getLevelText(); + /** + * string levelText = 16; + * @return The bytes for levelText. + */ + com.google.protobuf.ByteString + getLevelTextBytes(); + + /** + * string wantLevelID = 17; + * @return The wantLevelID. + */ + java.lang.String getWantLevelID(); + /** + * string wantLevelID = 17; + * @return The bytes for wantLevelID. + */ + com.google.protobuf.ByteString + getWantLevelIDBytes(); + + /** + * int32 autoMode = 18; + * @return The autoMode. + */ + int getAutoMode(); + + /** + * int32 noteSaltMode = 19; + * @return The noteSaltMode. + */ + int getNoteSaltMode(); + + /** + * double audioMultiplier = 20; + * @return The audioMultiplier. + */ + double getAudioMultiplier(); + + /** + * int32 faintNoteMode = 21; + * @return The faintNoteMode. + */ + int getFaintNoteMode(); + + /** + * int32 judgmentMode = 22; + * @return The judgmentMode. + */ + int getJudgmentMode(); + + /** + * int32 hitPointsMode = 23; + * @return The hitPointsMode. + */ + int getHitPointsMode(); + + /** + * int32 noteMobilityMode = 24; + * @return The noteMobilityMode. + */ + int getNoteMobilityMode(); + + /** + * int32 longNoteMode = 25; + * @return The longNoteMode. + */ + int getLongNoteMode(); + + /** + * int32 inputFavorMode = 26; + * @return The inputFavorMode. + */ + int getInputFavorMode(); + + /** + * int32 noteModifyMode = 27; + * @return The noteModifyMode. + */ + int getNoteModifyMode(); + + /** + * int32 bpmMode = 28; + * @return The bpmMode. + */ + int getBpmMode(); + + /** + * int32 waveMode = 29; + * @return The waveMode. + */ + int getWaveMode(); + + /** + * int32 setNoteMode = 30; + * @return The setNoteMode. + */ + int getSetNoteMode(); + + /** + * int32 lowestJudgmentConditionMode = 31; + * @return The lowestJudgmentConditionMode. + */ + int getLowestJudgmentConditionMode(); + + /** + * int32 totalNotes = 32; + * @return The totalNotes. + */ + int getTotalNotes(); + + /** + * double judgmentStage = 33; + * @return The judgmentStage. + */ + double getJudgmentStage(); + + /** + * double hitPointsValue = 34; + * @return The hitPointsValue. + */ + double getHitPointsValue(); + + /** + * int32 highestInputCount = 35; + * @return The highestInputCount. + */ + int getHighestInputCount(); + + /** + * double length = 36; + * @return The length. + */ + double getLength(); + + /** + * double bpm = 37; + * @return The bpm. + */ + double getBpm(); + + /** + * double multiplier = 38; + * @return The multiplier. + */ + double getMultiplier(); + + /** + * int32 inputMode = 39; + * @return The inputMode. + */ + int getInputMode(); + + /** + * double highestJudgment0 = 40; + * @return The highestJudgment0. + */ + double getHighestJudgment0(); + + /** + * double higherJudgment0 = 41; + * @return The higherJudgment0. + */ + double getHigherJudgment0(); + + /** + * double highJudgment0 = 42; + * @return The highJudgment0. + */ + double getHighJudgment0(); + + /** + * double lowJudgment0 = 43; + * @return The lowJudgment0. + */ + double getLowJudgment0(); + + /** + * double lowerJudgment0 = 44; + * @return The lowerJudgment0. + */ + double getLowerJudgment0(); + + /** + * double lowestJudgment0 = 45; + * @return The lowestJudgment0. + */ + double getLowestJudgment0(); + + /** + * double highestJudgment1 = 46; + * @return The highestJudgment1. + */ + double getHighestJudgment1(); + + /** + * double higherJudgment1 = 47; + * @return The higherJudgment1. + */ + double getHigherJudgment1(); + + /** + * double highJudgment1 = 48; + * @return The highJudgment1. + */ + double getHighJudgment1(); + + /** + * double lowJudgment1 = 49; + * @return The lowJudgment1. + */ + double getLowJudgment1(); + + /** + * double lowerJudgment1 = 50; + * @return The lowerJudgment1. + */ + double getLowerJudgment1(); + + /** + * double lowestJudgment1 = 51; + * @return The lowestJudgment1. + */ + double getLowestJudgment1(); + + /** + * int32 highestJudgment = 52; + * @return The highestJudgment. + */ + int getHighestJudgment(); + + /** + * int32 higherJudgment = 53; + * @return The higherJudgment. + */ + int getHigherJudgment(); + + /** + * int32 highJudgment = 54; + * @return The highJudgment. + */ + int getHighJudgment(); + + /** + * int32 lowJudgment = 55; + * @return The lowJudgment. + */ + int getLowJudgment(); + + /** + * int32 lowerJudgment = 56; + * @return The lowerJudgment. + */ + int getLowerJudgment(); + + /** + * int32 lowestJudgment = 57; + * @return The lowestJudgment. + */ + int getLowestJudgment(); + } + /** + * Protobuf type {@code Event.QwilightCallNet} + */ + public static final class QwilightCallNet extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.QwilightCallNet) + QwilightCallNetOrBuilder { + private static final long serialVersionUID = 0L; + // Use QwilightCallNet.newBuilder() to construct. + private QwilightCallNet(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QwilightCallNet() { + siteID_ = ""; + handlerID_ = ""; + avatarNetStatus_ = 0; + drawings_ = java.util.Collections.emptyList(); + title_ = ""; + artist_ = ""; + genre_ = ""; + levelText_ = ""; + wantLevelID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QwilightCallNet(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightCallNet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightCallNet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightCallNet.class, net.taehui.EventClass.Event.QwilightCallNet.Builder.class); + } + + private int bitField0_; + public static final int SITEID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object siteID_ = ""; + /** + * string siteID = 1; + * @return The siteID. + */ + @java.lang.Override + public java.lang.String getSiteID() { + java.lang.Object ref = siteID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteID_ = s; + return s; + } + } + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSiteIDBytes() { + java.lang.Object ref = siteID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HANDLERID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATARNETSTATUS_FIELD_NUMBER = 3; + private int avatarNetStatus_ = 0; + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @return The enum numeric value on the wire for avatarNetStatus. + */ + @java.lang.Override public int getAvatarNetStatusValue() { + return avatarNetStatus_; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @return The avatarNetStatus. + */ + @java.lang.Override public net.taehui.EventClass.Event.AvatarNetStatus getAvatarNetStatus() { + net.taehui.EventClass.Event.AvatarNetStatus result = net.taehui.EventClass.Event.AvatarNetStatus.forNumber(avatarNetStatus_); + return result == null ? net.taehui.EventClass.Event.AvatarNetStatus.UNRECOGNIZED : result; + } + + public static final int STAND_FIELD_NUMBER = 4; + private int stand_ = 0; + /** + * int32 stand = 4; + * @return The stand. + */ + @java.lang.Override + public int getStand() { + return stand_; + } + + public static final int HIGHESTBAND_FIELD_NUMBER = 5; + private int highestBand_ = 0; + /** + * int32 highestBand = 5; + * @return The highestBand. + */ + @java.lang.Override + public int getHighestBand() { + return highestBand_; + } + + public static final int POINT_FIELD_NUMBER = 6; + private double point_ = 0D; + /** + * double point = 6; + * @return The point. + */ + @java.lang.Override + public double getPoint() { + return point_; + } + + public static final int HITPOINTS_FIELD_NUMBER = 7; + private double hitPoints_ = 0D; + /** + * double hitPoints = 7; + * @return The hitPoints. + */ + @java.lang.Override + public double getHitPoints() { + return hitPoints_; + } + + public static final int ISFAILED_FIELD_NUMBER = 8; + private boolean isFailed_ = false; + /** + * bool isFailed = 8; + * @return The isFailed. + */ + @java.lang.Override + public boolean getIsFailed() { + return isFailed_; + } + + public static final int LASTJUDGED_FIELD_NUMBER = 9; + private int lastJudged_ = 0; + /** + * int32 lastJudged = 9; + * @return The lastJudged. + */ + @java.lang.Override + public int getLastJudged() { + return lastJudged_; + } + + public static final int DRAWINGS_FIELD_NUMBER = 10; + @SuppressWarnings("serial") + private java.util.List drawings_; + /** + * repeated .Event.NetDrawing drawings = 10; + */ + @java.lang.Override + public java.util.List getDrawingsList() { + return drawings_; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + @java.lang.Override + public java.util.List + getDrawingsOrBuilderList() { + return drawings_; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + @java.lang.Override + public int getDrawingsCount() { + return drawings_.size(); + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawing getDrawings(int index) { + return drawings_.get(index); + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawingOrBuilder getDrawingsOrBuilder( + int index) { + return drawings_.get(index); + } + + public static final int DRAWINGCOMPONENT_FIELD_NUMBER = 11; + private net.taehui.EventClass.Event.DrawingComponent drawingComponent_; + /** + * .Event.DrawingComponent drawingComponent = 11; + * @return Whether the drawingComponent field is set. + */ + @java.lang.Override + public boolean hasDrawingComponent() { + return ((bitField0_ & 0x00000001) != 0); + } + /** + * .Event.DrawingComponent drawingComponent = 11; + * @return The drawingComponent. + */ + @java.lang.Override + public net.taehui.EventClass.Event.DrawingComponent getDrawingComponent() { + return drawingComponent_ == null ? net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance() : drawingComponent_; + } + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + @java.lang.Override + public net.taehui.EventClass.Event.DrawingComponentOrBuilder getDrawingComponentOrBuilder() { + return drawingComponent_ == null ? net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance() : drawingComponent_; + } + + public static final int TITLE_FIELD_NUMBER = 12; + @SuppressWarnings("serial") + private volatile java.lang.Object title_ = ""; + /** + * string title = 12; + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * string title = 12; + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ARTIST_FIELD_NUMBER = 13; + @SuppressWarnings("serial") + private volatile java.lang.Object artist_ = ""; + /** + * string artist = 13; + * @return The artist. + */ + @java.lang.Override + public java.lang.String getArtist() { + java.lang.Object ref = artist_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artist_ = s; + return s; + } + } + /** + * string artist = 13; + * @return The bytes for artist. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getArtistBytes() { + java.lang.Object ref = artist_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artist_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GENRE_FIELD_NUMBER = 14; + @SuppressWarnings("serial") + private volatile java.lang.Object genre_ = ""; + /** + * string genre = 14; + * @return The genre. + */ + @java.lang.Override + public java.lang.String getGenre() { + java.lang.Object ref = genre_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + genre_ = s; + return s; + } + } + /** + * string genre = 14; + * @return The bytes for genre. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getGenreBytes() { + java.lang.Object ref = genre_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + genre_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LEVEL_FIELD_NUMBER = 15; + private int level_ = 0; + /** + * int32 level = 15; + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + + public static final int LEVELTEXT_FIELD_NUMBER = 16; + @SuppressWarnings("serial") + private volatile java.lang.Object levelText_ = ""; + /** + * string levelText = 16; + * @return The levelText. + */ + @java.lang.Override + public java.lang.String getLevelText() { + java.lang.Object ref = levelText_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + levelText_ = s; + return s; + } + } + /** + * string levelText = 16; + * @return The bytes for levelText. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getLevelTextBytes() { + java.lang.Object ref = levelText_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + levelText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WANTLEVELID_FIELD_NUMBER = 17; + @SuppressWarnings("serial") + private volatile java.lang.Object wantLevelID_ = ""; + /** + * string wantLevelID = 17; + * @return The wantLevelID. + */ + @java.lang.Override + public java.lang.String getWantLevelID() { + java.lang.Object ref = wantLevelID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wantLevelID_ = s; + return s; + } + } + /** + * string wantLevelID = 17; + * @return The bytes for wantLevelID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getWantLevelIDBytes() { + java.lang.Object ref = wantLevelID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + wantLevelID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTOMODE_FIELD_NUMBER = 18; + private int autoMode_ = 0; + /** + * int32 autoMode = 18; + * @return The autoMode. + */ + @java.lang.Override + public int getAutoMode() { + return autoMode_; + } + + public static final int NOTESALTMODE_FIELD_NUMBER = 19; + private int noteSaltMode_ = 0; + /** + * int32 noteSaltMode = 19; + * @return The noteSaltMode. + */ + @java.lang.Override + public int getNoteSaltMode() { + return noteSaltMode_; + } + + public static final int AUDIOMULTIPLIER_FIELD_NUMBER = 20; + private double audioMultiplier_ = 0D; + /** + * double audioMultiplier = 20; + * @return The audioMultiplier. + */ + @java.lang.Override + public double getAudioMultiplier() { + return audioMultiplier_; + } + + public static final int FAINTNOTEMODE_FIELD_NUMBER = 21; + private int faintNoteMode_ = 0; + /** + * int32 faintNoteMode = 21; + * @return The faintNoteMode. + */ + @java.lang.Override + public int getFaintNoteMode() { + return faintNoteMode_; + } + + public static final int JUDGMENTMODE_FIELD_NUMBER = 22; + private int judgmentMode_ = 0; + /** + * int32 judgmentMode = 22; + * @return The judgmentMode. + */ + @java.lang.Override + public int getJudgmentMode() { + return judgmentMode_; + } + + public static final int HITPOINTSMODE_FIELD_NUMBER = 23; + private int hitPointsMode_ = 0; + /** + * int32 hitPointsMode = 23; + * @return The hitPointsMode. + */ + @java.lang.Override + public int getHitPointsMode() { + return hitPointsMode_; + } + + public static final int NOTEMOBILITYMODE_FIELD_NUMBER = 24; + private int noteMobilityMode_ = 0; + /** + * int32 noteMobilityMode = 24; + * @return The noteMobilityMode. + */ + @java.lang.Override + public int getNoteMobilityMode() { + return noteMobilityMode_; + } + + public static final int LONGNOTEMODE_FIELD_NUMBER = 25; + private int longNoteMode_ = 0; + /** + * int32 longNoteMode = 25; + * @return The longNoteMode. + */ + @java.lang.Override + public int getLongNoteMode() { + return longNoteMode_; + } + + public static final int INPUTFAVORMODE_FIELD_NUMBER = 26; + private int inputFavorMode_ = 0; + /** + * int32 inputFavorMode = 26; + * @return The inputFavorMode. + */ + @java.lang.Override + public int getInputFavorMode() { + return inputFavorMode_; + } + + public static final int NOTEMODIFYMODE_FIELD_NUMBER = 27; + private int noteModifyMode_ = 0; + /** + * int32 noteModifyMode = 27; + * @return The noteModifyMode. + */ + @java.lang.Override + public int getNoteModifyMode() { + return noteModifyMode_; + } + + public static final int BPMMODE_FIELD_NUMBER = 28; + private int bpmMode_ = 0; + /** + * int32 bpmMode = 28; + * @return The bpmMode. + */ + @java.lang.Override + public int getBpmMode() { + return bpmMode_; + } + + public static final int WAVEMODE_FIELD_NUMBER = 29; + private int waveMode_ = 0; + /** + * int32 waveMode = 29; + * @return The waveMode. + */ + @java.lang.Override + public int getWaveMode() { + return waveMode_; + } + + public static final int SETNOTEMODE_FIELD_NUMBER = 30; + private int setNoteMode_ = 0; + /** + * int32 setNoteMode = 30; + * @return The setNoteMode. + */ + @java.lang.Override + public int getSetNoteMode() { + return setNoteMode_; + } + + public static final int LOWESTJUDGMENTCONDITIONMODE_FIELD_NUMBER = 31; + private int lowestJudgmentConditionMode_ = 0; + /** + * int32 lowestJudgmentConditionMode = 31; + * @return The lowestJudgmentConditionMode. + */ + @java.lang.Override + public int getLowestJudgmentConditionMode() { + return lowestJudgmentConditionMode_; + } + + public static final int TOTALNOTES_FIELD_NUMBER = 32; + private int totalNotes_ = 0; + /** + * int32 totalNotes = 32; + * @return The totalNotes. + */ + @java.lang.Override + public int getTotalNotes() { + return totalNotes_; + } + + public static final int JUDGMENTSTAGE_FIELD_NUMBER = 33; + private double judgmentStage_ = 0D; + /** + * double judgmentStage = 33; + * @return The judgmentStage. + */ + @java.lang.Override + public double getJudgmentStage() { + return judgmentStage_; + } + + public static final int HITPOINTSVALUE_FIELD_NUMBER = 34; + private double hitPointsValue_ = 0D; + /** + * double hitPointsValue = 34; + * @return The hitPointsValue. + */ + @java.lang.Override + public double getHitPointsValue() { + return hitPointsValue_; + } + + public static final int HIGHESTINPUTCOUNT_FIELD_NUMBER = 35; + private int highestInputCount_ = 0; + /** + * int32 highestInputCount = 35; + * @return The highestInputCount. + */ + @java.lang.Override + public int getHighestInputCount() { + return highestInputCount_; + } + + public static final int LENGTH_FIELD_NUMBER = 36; + private double length_ = 0D; + /** + * double length = 36; + * @return The length. + */ + @java.lang.Override + public double getLength() { + return length_; + } + + public static final int BPM_FIELD_NUMBER = 37; + private double bpm_ = 0D; + /** + * double bpm = 37; + * @return The bpm. + */ + @java.lang.Override + public double getBpm() { + return bpm_; + } + + public static final int MULTIPLIER_FIELD_NUMBER = 38; + private double multiplier_ = 0D; + /** + * double multiplier = 38; + * @return The multiplier. + */ + @java.lang.Override + public double getMultiplier() { + return multiplier_; + } + + public static final int INPUTMODE_FIELD_NUMBER = 39; + private int inputMode_ = 0; + /** + * int32 inputMode = 39; + * @return The inputMode. + */ + @java.lang.Override + public int getInputMode() { + return inputMode_; + } + + public static final int HIGHESTJUDGMENT0_FIELD_NUMBER = 40; + private double highestJudgment0_ = 0D; + /** + * double highestJudgment0 = 40; + * @return The highestJudgment0. + */ + @java.lang.Override + public double getHighestJudgment0() { + return highestJudgment0_; + } + + public static final int HIGHERJUDGMENT0_FIELD_NUMBER = 41; + private double higherJudgment0_ = 0D; + /** + * double higherJudgment0 = 41; + * @return The higherJudgment0. + */ + @java.lang.Override + public double getHigherJudgment0() { + return higherJudgment0_; + } + + public static final int HIGHJUDGMENT0_FIELD_NUMBER = 42; + private double highJudgment0_ = 0D; + /** + * double highJudgment0 = 42; + * @return The highJudgment0. + */ + @java.lang.Override + public double getHighJudgment0() { + return highJudgment0_; + } + + public static final int LOWJUDGMENT0_FIELD_NUMBER = 43; + private double lowJudgment0_ = 0D; + /** + * double lowJudgment0 = 43; + * @return The lowJudgment0. + */ + @java.lang.Override + public double getLowJudgment0() { + return lowJudgment0_; + } + + public static final int LOWERJUDGMENT0_FIELD_NUMBER = 44; + private double lowerJudgment0_ = 0D; + /** + * double lowerJudgment0 = 44; + * @return The lowerJudgment0. + */ + @java.lang.Override + public double getLowerJudgment0() { + return lowerJudgment0_; + } + + public static final int LOWESTJUDGMENT0_FIELD_NUMBER = 45; + private double lowestJudgment0_ = 0D; + /** + * double lowestJudgment0 = 45; + * @return The lowestJudgment0. + */ + @java.lang.Override + public double getLowestJudgment0() { + return lowestJudgment0_; + } + + public static final int HIGHESTJUDGMENT1_FIELD_NUMBER = 46; + private double highestJudgment1_ = 0D; + /** + * double highestJudgment1 = 46; + * @return The highestJudgment1. + */ + @java.lang.Override + public double getHighestJudgment1() { + return highestJudgment1_; + } + + public static final int HIGHERJUDGMENT1_FIELD_NUMBER = 47; + private double higherJudgment1_ = 0D; + /** + * double higherJudgment1 = 47; + * @return The higherJudgment1. + */ + @java.lang.Override + public double getHigherJudgment1() { + return higherJudgment1_; + } + + public static final int HIGHJUDGMENT1_FIELD_NUMBER = 48; + private double highJudgment1_ = 0D; + /** + * double highJudgment1 = 48; + * @return The highJudgment1. + */ + @java.lang.Override + public double getHighJudgment1() { + return highJudgment1_; + } + + public static final int LOWJUDGMENT1_FIELD_NUMBER = 49; + private double lowJudgment1_ = 0D; + /** + * double lowJudgment1 = 49; + * @return The lowJudgment1. + */ + @java.lang.Override + public double getLowJudgment1() { + return lowJudgment1_; + } + + public static final int LOWERJUDGMENT1_FIELD_NUMBER = 50; + private double lowerJudgment1_ = 0D; + /** + * double lowerJudgment1 = 50; + * @return The lowerJudgment1. + */ + @java.lang.Override + public double getLowerJudgment1() { + return lowerJudgment1_; + } + + public static final int LOWESTJUDGMENT1_FIELD_NUMBER = 51; + private double lowestJudgment1_ = 0D; + /** + * double lowestJudgment1 = 51; + * @return The lowestJudgment1. + */ + @java.lang.Override + public double getLowestJudgment1() { + return lowestJudgment1_; + } + + public static final int HIGHESTJUDGMENT_FIELD_NUMBER = 52; + private int highestJudgment_ = 0; + /** + * int32 highestJudgment = 52; + * @return The highestJudgment. + */ + @java.lang.Override + public int getHighestJudgment() { + return highestJudgment_; + } + + public static final int HIGHERJUDGMENT_FIELD_NUMBER = 53; + private int higherJudgment_ = 0; + /** + * int32 higherJudgment = 53; + * @return The higherJudgment. + */ + @java.lang.Override + public int getHigherJudgment() { + return higherJudgment_; + } + + public static final int HIGHJUDGMENT_FIELD_NUMBER = 54; + private int highJudgment_ = 0; + /** + * int32 highJudgment = 54; + * @return The highJudgment. + */ + @java.lang.Override + public int getHighJudgment() { + return highJudgment_; + } + + public static final int LOWJUDGMENT_FIELD_NUMBER = 55; + private int lowJudgment_ = 0; + /** + * int32 lowJudgment = 55; + * @return The lowJudgment. + */ + @java.lang.Override + public int getLowJudgment() { + return lowJudgment_; + } + + public static final int LOWERJUDGMENT_FIELD_NUMBER = 56; + private int lowerJudgment_ = 0; + /** + * int32 lowerJudgment = 56; + * @return The lowerJudgment. + */ + @java.lang.Override + public int getLowerJudgment() { + return lowerJudgment_; + } + + public static final int LOWESTJUDGMENT_FIELD_NUMBER = 57; + private int lowestJudgment_ = 0; + /** + * int32 lowestJudgment = 57; + * @return The lowestJudgment. + */ + @java.lang.Override + public int getLowestJudgment() { + return lowestJudgment_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handlerID_); + } + if (avatarNetStatus_ != net.taehui.EventClass.Event.AvatarNetStatus.Default.getNumber()) { + output.writeEnum(3, avatarNetStatus_); + } + if (stand_ != 0) { + output.writeInt32(4, stand_); + } + if (highestBand_ != 0) { + output.writeInt32(5, highestBand_); + } + if (java.lang.Double.doubleToRawLongBits(point_) != 0) { + output.writeDouble(6, point_); + } + if (java.lang.Double.doubleToRawLongBits(hitPoints_) != 0) { + output.writeDouble(7, hitPoints_); + } + if (isFailed_ != false) { + output.writeBool(8, isFailed_); + } + if (lastJudged_ != 0) { + output.writeInt32(9, lastJudged_); + } + for (int i = 0; i < drawings_.size(); i++) { + output.writeMessage(10, drawings_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + output.writeMessage(11, getDrawingComponent()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 12, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artist_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, artist_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(genre_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 14, genre_); + } + if (level_ != 0) { + output.writeInt32(15, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(levelText_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 16, levelText_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wantLevelID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 17, wantLevelID_); + } + if (autoMode_ != 0) { + output.writeInt32(18, autoMode_); + } + if (noteSaltMode_ != 0) { + output.writeInt32(19, noteSaltMode_); + } + if (java.lang.Double.doubleToRawLongBits(audioMultiplier_) != 0) { + output.writeDouble(20, audioMultiplier_); + } + if (faintNoteMode_ != 0) { + output.writeInt32(21, faintNoteMode_); + } + if (judgmentMode_ != 0) { + output.writeInt32(22, judgmentMode_); + } + if (hitPointsMode_ != 0) { + output.writeInt32(23, hitPointsMode_); + } + if (noteMobilityMode_ != 0) { + output.writeInt32(24, noteMobilityMode_); + } + if (longNoteMode_ != 0) { + output.writeInt32(25, longNoteMode_); + } + if (inputFavorMode_ != 0) { + output.writeInt32(26, inputFavorMode_); + } + if (noteModifyMode_ != 0) { + output.writeInt32(27, noteModifyMode_); + } + if (bpmMode_ != 0) { + output.writeInt32(28, bpmMode_); + } + if (waveMode_ != 0) { + output.writeInt32(29, waveMode_); + } + if (setNoteMode_ != 0) { + output.writeInt32(30, setNoteMode_); + } + if (lowestJudgmentConditionMode_ != 0) { + output.writeInt32(31, lowestJudgmentConditionMode_); + } + if (totalNotes_ != 0) { + output.writeInt32(32, totalNotes_); + } + if (java.lang.Double.doubleToRawLongBits(judgmentStage_) != 0) { + output.writeDouble(33, judgmentStage_); + } + if (java.lang.Double.doubleToRawLongBits(hitPointsValue_) != 0) { + output.writeDouble(34, hitPointsValue_); + } + if (highestInputCount_ != 0) { + output.writeInt32(35, highestInputCount_); + } + if (java.lang.Double.doubleToRawLongBits(length_) != 0) { + output.writeDouble(36, length_); + } + if (java.lang.Double.doubleToRawLongBits(bpm_) != 0) { + output.writeDouble(37, bpm_); + } + if (java.lang.Double.doubleToRawLongBits(multiplier_) != 0) { + output.writeDouble(38, multiplier_); + } + if (inputMode_ != 0) { + output.writeInt32(39, inputMode_); + } + if (java.lang.Double.doubleToRawLongBits(highestJudgment0_) != 0) { + output.writeDouble(40, highestJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(higherJudgment0_) != 0) { + output.writeDouble(41, higherJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(highJudgment0_) != 0) { + output.writeDouble(42, highJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(lowJudgment0_) != 0) { + output.writeDouble(43, lowJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(lowerJudgment0_) != 0) { + output.writeDouble(44, lowerJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(lowestJudgment0_) != 0) { + output.writeDouble(45, lowestJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(highestJudgment1_) != 0) { + output.writeDouble(46, highestJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(higherJudgment1_) != 0) { + output.writeDouble(47, higherJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(highJudgment1_) != 0) { + output.writeDouble(48, highJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(lowJudgment1_) != 0) { + output.writeDouble(49, lowJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(lowerJudgment1_) != 0) { + output.writeDouble(50, lowerJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(lowestJudgment1_) != 0) { + output.writeDouble(51, lowestJudgment1_); + } + if (highestJudgment_ != 0) { + output.writeInt32(52, highestJudgment_); + } + if (higherJudgment_ != 0) { + output.writeInt32(53, higherJudgment_); + } + if (highJudgment_ != 0) { + output.writeInt32(54, highJudgment_); + } + if (lowJudgment_ != 0) { + output.writeInt32(55, lowJudgment_); + } + if (lowerJudgment_ != 0) { + output.writeInt32(56, lowerJudgment_); + } + if (lowestJudgment_ != 0) { + output.writeInt32(57, lowestJudgment_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handlerID_); + } + if (avatarNetStatus_ != net.taehui.EventClass.Event.AvatarNetStatus.Default.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, avatarNetStatus_); + } + if (stand_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, stand_); + } + if (highestBand_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, highestBand_); + } + if (java.lang.Double.doubleToRawLongBits(point_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, point_); + } + if (java.lang.Double.doubleToRawLongBits(hitPoints_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(7, hitPoints_); + } + if (isFailed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(8, isFailed_); + } + if (lastJudged_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(9, lastJudged_); + } + for (int i = 0; i < drawings_.size(); i++) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, drawings_.get(i)); + } + if (((bitField0_ & 0x00000001) != 0)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getDrawingComponent()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, title_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(artist_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, artist_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(genre_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, genre_); + } + if (level_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(15, level_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(levelText_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, levelText_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(wantLevelID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, wantLevelID_); + } + if (autoMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(18, autoMode_); + } + if (noteSaltMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(19, noteSaltMode_); + } + if (java.lang.Double.doubleToRawLongBits(audioMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(20, audioMultiplier_); + } + if (faintNoteMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(21, faintNoteMode_); + } + if (judgmentMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(22, judgmentMode_); + } + if (hitPointsMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(23, hitPointsMode_); + } + if (noteMobilityMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(24, noteMobilityMode_); + } + if (longNoteMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(25, longNoteMode_); + } + if (inputFavorMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(26, inputFavorMode_); + } + if (noteModifyMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(27, noteModifyMode_); + } + if (bpmMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(28, bpmMode_); + } + if (waveMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(29, waveMode_); + } + if (setNoteMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(30, setNoteMode_); + } + if (lowestJudgmentConditionMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(31, lowestJudgmentConditionMode_); + } + if (totalNotes_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(32, totalNotes_); + } + if (java.lang.Double.doubleToRawLongBits(judgmentStage_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(33, judgmentStage_); + } + if (java.lang.Double.doubleToRawLongBits(hitPointsValue_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(34, hitPointsValue_); + } + if (highestInputCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(35, highestInputCount_); + } + if (java.lang.Double.doubleToRawLongBits(length_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(36, length_); + } + if (java.lang.Double.doubleToRawLongBits(bpm_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(37, bpm_); + } + if (java.lang.Double.doubleToRawLongBits(multiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(38, multiplier_); + } + if (inputMode_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(39, inputMode_); + } + if (java.lang.Double.doubleToRawLongBits(highestJudgment0_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(40, highestJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(higherJudgment0_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(41, higherJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(highJudgment0_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(42, highJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(lowJudgment0_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(43, lowJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(lowerJudgment0_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(44, lowerJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(lowestJudgment0_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(45, lowestJudgment0_); + } + if (java.lang.Double.doubleToRawLongBits(highestJudgment1_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(46, highestJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(higherJudgment1_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(47, higherJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(highJudgment1_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(48, highJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(lowJudgment1_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(49, lowJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(lowerJudgment1_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(50, lowerJudgment1_); + } + if (java.lang.Double.doubleToRawLongBits(lowestJudgment1_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(51, lowestJudgment1_); + } + if (highestJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(52, highestJudgment_); + } + if (higherJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(53, higherJudgment_); + } + if (highJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(54, highJudgment_); + } + if (lowJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(55, lowJudgment_); + } + if (lowerJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(56, lowerJudgment_); + } + if (lowestJudgment_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(57, lowestJudgment_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.QwilightCallNet)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.QwilightCallNet other = (net.taehui.EventClass.Event.QwilightCallNet) obj; + + if (!getSiteID() + .equals(other.getSiteID())) return false; + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (avatarNetStatus_ != other.avatarNetStatus_) return false; + if (getStand() + != other.getStand()) return false; + if (getHighestBand() + != other.getHighestBand()) return false; + if (java.lang.Double.doubleToLongBits(getPoint()) + != java.lang.Double.doubleToLongBits( + other.getPoint())) return false; + if (java.lang.Double.doubleToLongBits(getHitPoints()) + != java.lang.Double.doubleToLongBits( + other.getHitPoints())) return false; + if (getIsFailed() + != other.getIsFailed()) return false; + if (getLastJudged() + != other.getLastJudged()) return false; + if (!getDrawingsList() + .equals(other.getDrawingsList())) return false; + if (hasDrawingComponent() != other.hasDrawingComponent()) return false; + if (hasDrawingComponent()) { + if (!getDrawingComponent() + .equals(other.getDrawingComponent())) return false; + } + if (!getTitle() + .equals(other.getTitle())) return false; + if (!getArtist() + .equals(other.getArtist())) return false; + if (!getGenre() + .equals(other.getGenre())) return false; + if (getLevel() + != other.getLevel()) return false; + if (!getLevelText() + .equals(other.getLevelText())) return false; + if (!getWantLevelID() + .equals(other.getWantLevelID())) return false; + if (getAutoMode() + != other.getAutoMode()) return false; + if (getNoteSaltMode() + != other.getNoteSaltMode()) return false; + if (java.lang.Double.doubleToLongBits(getAudioMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getAudioMultiplier())) return false; + if (getFaintNoteMode() + != other.getFaintNoteMode()) return false; + if (getJudgmentMode() + != other.getJudgmentMode()) return false; + if (getHitPointsMode() + != other.getHitPointsMode()) return false; + if (getNoteMobilityMode() + != other.getNoteMobilityMode()) return false; + if (getLongNoteMode() + != other.getLongNoteMode()) return false; + if (getInputFavorMode() + != other.getInputFavorMode()) return false; + if (getNoteModifyMode() + != other.getNoteModifyMode()) return false; + if (getBpmMode() + != other.getBpmMode()) return false; + if (getWaveMode() + != other.getWaveMode()) return false; + if (getSetNoteMode() + != other.getSetNoteMode()) return false; + if (getLowestJudgmentConditionMode() + != other.getLowestJudgmentConditionMode()) return false; + if (getTotalNotes() + != other.getTotalNotes()) return false; + if (java.lang.Double.doubleToLongBits(getJudgmentStage()) + != java.lang.Double.doubleToLongBits( + other.getJudgmentStage())) return false; + if (java.lang.Double.doubleToLongBits(getHitPointsValue()) + != java.lang.Double.doubleToLongBits( + other.getHitPointsValue())) return false; + if (getHighestInputCount() + != other.getHighestInputCount()) return false; + if (java.lang.Double.doubleToLongBits(getLength()) + != java.lang.Double.doubleToLongBits( + other.getLength())) return false; + if (java.lang.Double.doubleToLongBits(getBpm()) + != java.lang.Double.doubleToLongBits( + other.getBpm())) return false; + if (java.lang.Double.doubleToLongBits(getMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getMultiplier())) return false; + if (getInputMode() + != other.getInputMode()) return false; + if (java.lang.Double.doubleToLongBits(getHighestJudgment0()) + != java.lang.Double.doubleToLongBits( + other.getHighestJudgment0())) return false; + if (java.lang.Double.doubleToLongBits(getHigherJudgment0()) + != java.lang.Double.doubleToLongBits( + other.getHigherJudgment0())) return false; + if (java.lang.Double.doubleToLongBits(getHighJudgment0()) + != java.lang.Double.doubleToLongBits( + other.getHighJudgment0())) return false; + if (java.lang.Double.doubleToLongBits(getLowJudgment0()) + != java.lang.Double.doubleToLongBits( + other.getLowJudgment0())) return false; + if (java.lang.Double.doubleToLongBits(getLowerJudgment0()) + != java.lang.Double.doubleToLongBits( + other.getLowerJudgment0())) return false; + if (java.lang.Double.doubleToLongBits(getLowestJudgment0()) + != java.lang.Double.doubleToLongBits( + other.getLowestJudgment0())) return false; + if (java.lang.Double.doubleToLongBits(getHighestJudgment1()) + != java.lang.Double.doubleToLongBits( + other.getHighestJudgment1())) return false; + if (java.lang.Double.doubleToLongBits(getHigherJudgment1()) + != java.lang.Double.doubleToLongBits( + other.getHigherJudgment1())) return false; + if (java.lang.Double.doubleToLongBits(getHighJudgment1()) + != java.lang.Double.doubleToLongBits( + other.getHighJudgment1())) return false; + if (java.lang.Double.doubleToLongBits(getLowJudgment1()) + != java.lang.Double.doubleToLongBits( + other.getLowJudgment1())) return false; + if (java.lang.Double.doubleToLongBits(getLowerJudgment1()) + != java.lang.Double.doubleToLongBits( + other.getLowerJudgment1())) return false; + if (java.lang.Double.doubleToLongBits(getLowestJudgment1()) + != java.lang.Double.doubleToLongBits( + other.getLowestJudgment1())) return false; + if (getHighestJudgment() + != other.getHighestJudgment()) return false; + if (getHigherJudgment() + != other.getHigherJudgment()) return false; + if (getHighJudgment() + != other.getHighJudgment()) return false; + if (getLowJudgment() + != other.getLowJudgment()) return false; + if (getLowerJudgment() + != other.getLowerJudgment()) return false; + if (getLowestJudgment() + != other.getLowestJudgment()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITEID_FIELD_NUMBER; + hash = (53 * hash) + getSiteID().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + AVATARNETSTATUS_FIELD_NUMBER; + hash = (53 * hash) + avatarNetStatus_; + hash = (37 * hash) + STAND_FIELD_NUMBER; + hash = (53 * hash) + getStand(); + hash = (37 * hash) + HIGHESTBAND_FIELD_NUMBER; + hash = (53 * hash) + getHighestBand(); + hash = (37 * hash) + POINT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPoint())); + hash = (37 * hash) + HITPOINTS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHitPoints())); + hash = (37 * hash) + ISFAILED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getIsFailed()); + hash = (37 * hash) + LASTJUDGED_FIELD_NUMBER; + hash = (53 * hash) + getLastJudged(); + if (getDrawingsCount() > 0) { + hash = (37 * hash) + DRAWINGS_FIELD_NUMBER; + hash = (53 * hash) + getDrawingsList().hashCode(); + } + if (hasDrawingComponent()) { + hash = (37 * hash) + DRAWINGCOMPONENT_FIELD_NUMBER; + hash = (53 * hash) + getDrawingComponent().hashCode(); + } + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + ARTIST_FIELD_NUMBER; + hash = (53 * hash) + getArtist().hashCode(); + hash = (37 * hash) + GENRE_FIELD_NUMBER; + hash = (53 * hash) + getGenre().hashCode(); + hash = (37 * hash) + LEVEL_FIELD_NUMBER; + hash = (53 * hash) + getLevel(); + hash = (37 * hash) + LEVELTEXT_FIELD_NUMBER; + hash = (53 * hash) + getLevelText().hashCode(); + hash = (37 * hash) + WANTLEVELID_FIELD_NUMBER; + hash = (53 * hash) + getWantLevelID().hashCode(); + hash = (37 * hash) + AUTOMODE_FIELD_NUMBER; + hash = (53 * hash) + getAutoMode(); + hash = (37 * hash) + NOTESALTMODE_FIELD_NUMBER; + hash = (53 * hash) + getNoteSaltMode(); + hash = (37 * hash) + AUDIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAudioMultiplier())); + hash = (37 * hash) + FAINTNOTEMODE_FIELD_NUMBER; + hash = (53 * hash) + getFaintNoteMode(); + hash = (37 * hash) + JUDGMENTMODE_FIELD_NUMBER; + hash = (53 * hash) + getJudgmentMode(); + hash = (37 * hash) + HITPOINTSMODE_FIELD_NUMBER; + hash = (53 * hash) + getHitPointsMode(); + hash = (37 * hash) + NOTEMOBILITYMODE_FIELD_NUMBER; + hash = (53 * hash) + getNoteMobilityMode(); + hash = (37 * hash) + LONGNOTEMODE_FIELD_NUMBER; + hash = (53 * hash) + getLongNoteMode(); + hash = (37 * hash) + INPUTFAVORMODE_FIELD_NUMBER; + hash = (53 * hash) + getInputFavorMode(); + hash = (37 * hash) + NOTEMODIFYMODE_FIELD_NUMBER; + hash = (53 * hash) + getNoteModifyMode(); + hash = (37 * hash) + BPMMODE_FIELD_NUMBER; + hash = (53 * hash) + getBpmMode(); + hash = (37 * hash) + WAVEMODE_FIELD_NUMBER; + hash = (53 * hash) + getWaveMode(); + hash = (37 * hash) + SETNOTEMODE_FIELD_NUMBER; + hash = (53 * hash) + getSetNoteMode(); + hash = (37 * hash) + LOWESTJUDGMENTCONDITIONMODE_FIELD_NUMBER; + hash = (53 * hash) + getLowestJudgmentConditionMode(); + hash = (37 * hash) + TOTALNOTES_FIELD_NUMBER; + hash = (53 * hash) + getTotalNotes(); + hash = (37 * hash) + JUDGMENTSTAGE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getJudgmentStage())); + hash = (37 * hash) + HITPOINTSVALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHitPointsValue())); + hash = (37 * hash) + HIGHESTINPUTCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getHighestInputCount(); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLength())); + hash = (37 * hash) + BPM_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getBpm())); + hash = (37 * hash) + MULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMultiplier())); + hash = (37 * hash) + INPUTMODE_FIELD_NUMBER; + hash = (53 * hash) + getInputMode(); + hash = (37 * hash) + HIGHESTJUDGMENT0_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHighestJudgment0())); + hash = (37 * hash) + HIGHERJUDGMENT0_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHigherJudgment0())); + hash = (37 * hash) + HIGHJUDGMENT0_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHighJudgment0())); + hash = (37 * hash) + LOWJUDGMENT0_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowJudgment0())); + hash = (37 * hash) + LOWERJUDGMENT0_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowerJudgment0())); + hash = (37 * hash) + LOWESTJUDGMENT0_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowestJudgment0())); + hash = (37 * hash) + HIGHESTJUDGMENT1_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHighestJudgment1())); + hash = (37 * hash) + HIGHERJUDGMENT1_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHigherJudgment1())); + hash = (37 * hash) + HIGHJUDGMENT1_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHighJudgment1())); + hash = (37 * hash) + LOWJUDGMENT1_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowJudgment1())); + hash = (37 * hash) + LOWERJUDGMENT1_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowerJudgment1())); + hash = (37 * hash) + LOWESTJUDGMENT1_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowestJudgment1())); + hash = (37 * hash) + HIGHESTJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getHighestJudgment(); + hash = (37 * hash) + HIGHERJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getHigherJudgment(); + hash = (37 * hash) + HIGHJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getHighJudgment(); + hash = (37 * hash) + LOWJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getLowJudgment(); + hash = (37 * hash) + LOWERJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getLowerJudgment(); + hash = (37 * hash) + LOWESTJUDGMENT_FIELD_NUMBER; + hash = (53 * hash) + getLowestJudgment(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.QwilightCallNet parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.QwilightCallNet parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightCallNet parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.QwilightCallNet prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.QwilightCallNet} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.QwilightCallNet) + net.taehui.EventClass.Event.QwilightCallNetOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightCallNet_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightCallNet_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightCallNet.class, net.taehui.EventClass.Event.QwilightCallNet.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.QwilightCallNet.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + getDrawingsFieldBuilder(); + getDrawingComponentFieldBuilder(); + } + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + bitField1_ = 0; + siteID_ = ""; + handlerID_ = ""; + avatarNetStatus_ = 0; + stand_ = 0; + highestBand_ = 0; + point_ = 0D; + hitPoints_ = 0D; + isFailed_ = false; + lastJudged_ = 0; + if (drawingsBuilder_ == null) { + drawings_ = java.util.Collections.emptyList(); + } else { + drawings_ = null; + drawingsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000200); + drawingComponent_ = null; + if (drawingComponentBuilder_ != null) { + drawingComponentBuilder_.dispose(); + drawingComponentBuilder_ = null; + } + title_ = ""; + artist_ = ""; + genre_ = ""; + level_ = 0; + levelText_ = ""; + wantLevelID_ = ""; + autoMode_ = 0; + noteSaltMode_ = 0; + audioMultiplier_ = 0D; + faintNoteMode_ = 0; + judgmentMode_ = 0; + hitPointsMode_ = 0; + noteMobilityMode_ = 0; + longNoteMode_ = 0; + inputFavorMode_ = 0; + noteModifyMode_ = 0; + bpmMode_ = 0; + waveMode_ = 0; + setNoteMode_ = 0; + lowestJudgmentConditionMode_ = 0; + totalNotes_ = 0; + judgmentStage_ = 0D; + hitPointsValue_ = 0D; + highestInputCount_ = 0; + length_ = 0D; + bpm_ = 0D; + multiplier_ = 0D; + inputMode_ = 0; + highestJudgment0_ = 0D; + higherJudgment0_ = 0D; + highJudgment0_ = 0D; + lowJudgment0_ = 0D; + lowerJudgment0_ = 0D; + lowestJudgment0_ = 0D; + highestJudgment1_ = 0D; + higherJudgment1_ = 0D; + highJudgment1_ = 0D; + lowJudgment1_ = 0D; + lowerJudgment1_ = 0D; + lowestJudgment1_ = 0D; + highestJudgment_ = 0; + higherJudgment_ = 0; + highJudgment_ = 0; + lowJudgment_ = 0; + lowerJudgment_ = 0; + lowestJudgment_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_QwilightCallNet_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightCallNet getDefaultInstanceForType() { + return net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightCallNet build() { + net.taehui.EventClass.Event.QwilightCallNet result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightCallNet buildPartial() { + net.taehui.EventClass.Event.QwilightCallNet result = new net.taehui.EventClass.Event.QwilightCallNet(this); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + if (bitField1_ != 0) { buildPartial1(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(net.taehui.EventClass.Event.QwilightCallNet result) { + if (drawingsBuilder_ == null) { + if (((bitField0_ & 0x00000200) != 0)) { + drawings_ = java.util.Collections.unmodifiableList(drawings_); + bitField0_ = (bitField0_ & ~0x00000200); + } + result.drawings_ = drawings_; + } else { + result.drawings_ = drawingsBuilder_.build(); + } + } + + private void buildPartial0(net.taehui.EventClass.Event.QwilightCallNet result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.siteID_ = siteID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.avatarNetStatus_ = avatarNetStatus_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.stand_ = stand_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.highestBand_ = highestBand_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.point_ = point_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + result.hitPoints_ = hitPoints_; + } + if (((from_bitField0_ & 0x00000080) != 0)) { + result.isFailed_ = isFailed_; + } + if (((from_bitField0_ & 0x00000100) != 0)) { + result.lastJudged_ = lastJudged_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000400) != 0)) { + result.drawingComponent_ = drawingComponentBuilder_ == null + ? drawingComponent_ + : drawingComponentBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000800) != 0)) { + result.title_ = title_; + } + if (((from_bitField0_ & 0x00001000) != 0)) { + result.artist_ = artist_; + } + if (((from_bitField0_ & 0x00002000) != 0)) { + result.genre_ = genre_; + } + if (((from_bitField0_ & 0x00004000) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00008000) != 0)) { + result.levelText_ = levelText_; + } + if (((from_bitField0_ & 0x00010000) != 0)) { + result.wantLevelID_ = wantLevelID_; + } + if (((from_bitField0_ & 0x00020000) != 0)) { + result.autoMode_ = autoMode_; + } + if (((from_bitField0_ & 0x00040000) != 0)) { + result.noteSaltMode_ = noteSaltMode_; + } + if (((from_bitField0_ & 0x00080000) != 0)) { + result.audioMultiplier_ = audioMultiplier_; + } + if (((from_bitField0_ & 0x00100000) != 0)) { + result.faintNoteMode_ = faintNoteMode_; + } + if (((from_bitField0_ & 0x00200000) != 0)) { + result.judgmentMode_ = judgmentMode_; + } + if (((from_bitField0_ & 0x00400000) != 0)) { + result.hitPointsMode_ = hitPointsMode_; + } + if (((from_bitField0_ & 0x00800000) != 0)) { + result.noteMobilityMode_ = noteMobilityMode_; + } + if (((from_bitField0_ & 0x01000000) != 0)) { + result.longNoteMode_ = longNoteMode_; + } + if (((from_bitField0_ & 0x02000000) != 0)) { + result.inputFavorMode_ = inputFavorMode_; + } + if (((from_bitField0_ & 0x04000000) != 0)) { + result.noteModifyMode_ = noteModifyMode_; + } + if (((from_bitField0_ & 0x08000000) != 0)) { + result.bpmMode_ = bpmMode_; + } + if (((from_bitField0_ & 0x10000000) != 0)) { + result.waveMode_ = waveMode_; + } + if (((from_bitField0_ & 0x20000000) != 0)) { + result.setNoteMode_ = setNoteMode_; + } + if (((from_bitField0_ & 0x40000000) != 0)) { + result.lowestJudgmentConditionMode_ = lowestJudgmentConditionMode_; + } + if (((from_bitField0_ & 0x80000000) != 0)) { + result.totalNotes_ = totalNotes_; + } + result.bitField0_ |= to_bitField0_; + } + + private void buildPartial1(net.taehui.EventClass.Event.QwilightCallNet result) { + int from_bitField1_ = bitField1_; + if (((from_bitField1_ & 0x00000001) != 0)) { + result.judgmentStage_ = judgmentStage_; + } + if (((from_bitField1_ & 0x00000002) != 0)) { + result.hitPointsValue_ = hitPointsValue_; + } + if (((from_bitField1_ & 0x00000004) != 0)) { + result.highestInputCount_ = highestInputCount_; + } + if (((from_bitField1_ & 0x00000008) != 0)) { + result.length_ = length_; + } + if (((from_bitField1_ & 0x00000010) != 0)) { + result.bpm_ = bpm_; + } + if (((from_bitField1_ & 0x00000020) != 0)) { + result.multiplier_ = multiplier_; + } + if (((from_bitField1_ & 0x00000040) != 0)) { + result.inputMode_ = inputMode_; + } + if (((from_bitField1_ & 0x00000080) != 0)) { + result.highestJudgment0_ = highestJudgment0_; + } + if (((from_bitField1_ & 0x00000100) != 0)) { + result.higherJudgment0_ = higherJudgment0_; + } + if (((from_bitField1_ & 0x00000200) != 0)) { + result.highJudgment0_ = highJudgment0_; + } + if (((from_bitField1_ & 0x00000400) != 0)) { + result.lowJudgment0_ = lowJudgment0_; + } + if (((from_bitField1_ & 0x00000800) != 0)) { + result.lowerJudgment0_ = lowerJudgment0_; + } + if (((from_bitField1_ & 0x00001000) != 0)) { + result.lowestJudgment0_ = lowestJudgment0_; + } + if (((from_bitField1_ & 0x00002000) != 0)) { + result.highestJudgment1_ = highestJudgment1_; + } + if (((from_bitField1_ & 0x00004000) != 0)) { + result.higherJudgment1_ = higherJudgment1_; + } + if (((from_bitField1_ & 0x00008000) != 0)) { + result.highJudgment1_ = highJudgment1_; + } + if (((from_bitField1_ & 0x00010000) != 0)) { + result.lowJudgment1_ = lowJudgment1_; + } + if (((from_bitField1_ & 0x00020000) != 0)) { + result.lowerJudgment1_ = lowerJudgment1_; + } + if (((from_bitField1_ & 0x00040000) != 0)) { + result.lowestJudgment1_ = lowestJudgment1_; + } + if (((from_bitField1_ & 0x00080000) != 0)) { + result.highestJudgment_ = highestJudgment_; + } + if (((from_bitField1_ & 0x00100000) != 0)) { + result.higherJudgment_ = higherJudgment_; + } + if (((from_bitField1_ & 0x00200000) != 0)) { + result.highJudgment_ = highJudgment_; + } + if (((from_bitField1_ & 0x00400000) != 0)) { + result.lowJudgment_ = lowJudgment_; + } + if (((from_bitField1_ & 0x00800000) != 0)) { + result.lowerJudgment_ = lowerJudgment_; + } + if (((from_bitField1_ & 0x01000000) != 0)) { + result.lowestJudgment_ = lowestJudgment_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.QwilightCallNet) { + return mergeFrom((net.taehui.EventClass.Event.QwilightCallNet)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.QwilightCallNet other) { + if (other == net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance()) return this; + if (!other.getSiteID().isEmpty()) { + siteID_ = other.siteID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.avatarNetStatus_ != 0) { + setAvatarNetStatusValue(other.getAvatarNetStatusValue()); + } + if (other.getStand() != 0) { + setStand(other.getStand()); + } + if (other.getHighestBand() != 0) { + setHighestBand(other.getHighestBand()); + } + if (other.getPoint() != 0D) { + setPoint(other.getPoint()); + } + if (other.getHitPoints() != 0D) { + setHitPoints(other.getHitPoints()); + } + if (other.getIsFailed() != false) { + setIsFailed(other.getIsFailed()); + } + if (other.getLastJudged() != 0) { + setLastJudged(other.getLastJudged()); + } + if (drawingsBuilder_ == null) { + if (!other.drawings_.isEmpty()) { + if (drawings_.isEmpty()) { + drawings_ = other.drawings_; + bitField0_ = (bitField0_ & ~0x00000200); + } else { + ensureDrawingsIsMutable(); + drawings_.addAll(other.drawings_); + } + onChanged(); + } + } else { + if (!other.drawings_.isEmpty()) { + if (drawingsBuilder_.isEmpty()) { + drawingsBuilder_.dispose(); + drawingsBuilder_ = null; + drawings_ = other.drawings_; + bitField0_ = (bitField0_ & ~0x00000200); + drawingsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? + getDrawingsFieldBuilder() : null; + } else { + drawingsBuilder_.addAllMessages(other.drawings_); + } + } + } + if (other.hasDrawingComponent()) { + mergeDrawingComponent(other.getDrawingComponent()); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + bitField0_ |= 0x00000800; + onChanged(); + } + if (!other.getArtist().isEmpty()) { + artist_ = other.artist_; + bitField0_ |= 0x00001000; + onChanged(); + } + if (!other.getGenre().isEmpty()) { + genre_ = other.genre_; + bitField0_ |= 0x00002000; + onChanged(); + } + if (other.getLevel() != 0) { + setLevel(other.getLevel()); + } + if (!other.getLevelText().isEmpty()) { + levelText_ = other.levelText_; + bitField0_ |= 0x00008000; + onChanged(); + } + if (!other.getWantLevelID().isEmpty()) { + wantLevelID_ = other.wantLevelID_; + bitField0_ |= 0x00010000; + onChanged(); + } + if (other.getAutoMode() != 0) { + setAutoMode(other.getAutoMode()); + } + if (other.getNoteSaltMode() != 0) { + setNoteSaltMode(other.getNoteSaltMode()); + } + if (other.getAudioMultiplier() != 0D) { + setAudioMultiplier(other.getAudioMultiplier()); + } + if (other.getFaintNoteMode() != 0) { + setFaintNoteMode(other.getFaintNoteMode()); + } + if (other.getJudgmentMode() != 0) { + setJudgmentMode(other.getJudgmentMode()); + } + if (other.getHitPointsMode() != 0) { + setHitPointsMode(other.getHitPointsMode()); + } + if (other.getNoteMobilityMode() != 0) { + setNoteMobilityMode(other.getNoteMobilityMode()); + } + if (other.getLongNoteMode() != 0) { + setLongNoteMode(other.getLongNoteMode()); + } + if (other.getInputFavorMode() != 0) { + setInputFavorMode(other.getInputFavorMode()); + } + if (other.getNoteModifyMode() != 0) { + setNoteModifyMode(other.getNoteModifyMode()); + } + if (other.getBpmMode() != 0) { + setBpmMode(other.getBpmMode()); + } + if (other.getWaveMode() != 0) { + setWaveMode(other.getWaveMode()); + } + if (other.getSetNoteMode() != 0) { + setSetNoteMode(other.getSetNoteMode()); + } + if (other.getLowestJudgmentConditionMode() != 0) { + setLowestJudgmentConditionMode(other.getLowestJudgmentConditionMode()); + } + if (other.getTotalNotes() != 0) { + setTotalNotes(other.getTotalNotes()); + } + if (other.getJudgmentStage() != 0D) { + setJudgmentStage(other.getJudgmentStage()); + } + if (other.getHitPointsValue() != 0D) { + setHitPointsValue(other.getHitPointsValue()); + } + if (other.getHighestInputCount() != 0) { + setHighestInputCount(other.getHighestInputCount()); + } + if (other.getLength() != 0D) { + setLength(other.getLength()); + } + if (other.getBpm() != 0D) { + setBpm(other.getBpm()); + } + if (other.getMultiplier() != 0D) { + setMultiplier(other.getMultiplier()); + } + if (other.getInputMode() != 0) { + setInputMode(other.getInputMode()); + } + if (other.getHighestJudgment0() != 0D) { + setHighestJudgment0(other.getHighestJudgment0()); + } + if (other.getHigherJudgment0() != 0D) { + setHigherJudgment0(other.getHigherJudgment0()); + } + if (other.getHighJudgment0() != 0D) { + setHighJudgment0(other.getHighJudgment0()); + } + if (other.getLowJudgment0() != 0D) { + setLowJudgment0(other.getLowJudgment0()); + } + if (other.getLowerJudgment0() != 0D) { + setLowerJudgment0(other.getLowerJudgment0()); + } + if (other.getLowestJudgment0() != 0D) { + setLowestJudgment0(other.getLowestJudgment0()); + } + if (other.getHighestJudgment1() != 0D) { + setHighestJudgment1(other.getHighestJudgment1()); + } + if (other.getHigherJudgment1() != 0D) { + setHigherJudgment1(other.getHigherJudgment1()); + } + if (other.getHighJudgment1() != 0D) { + setHighJudgment1(other.getHighJudgment1()); + } + if (other.getLowJudgment1() != 0D) { + setLowJudgment1(other.getLowJudgment1()); + } + if (other.getLowerJudgment1() != 0D) { + setLowerJudgment1(other.getLowerJudgment1()); + } + if (other.getLowestJudgment1() != 0D) { + setLowestJudgment1(other.getLowestJudgment1()); + } + if (other.getHighestJudgment() != 0) { + setHighestJudgment(other.getHighestJudgment()); + } + if (other.getHigherJudgment() != 0) { + setHigherJudgment(other.getHigherJudgment()); + } + if (other.getHighJudgment() != 0) { + setHighJudgment(other.getHighJudgment()); + } + if (other.getLowJudgment() != 0) { + setLowJudgment(other.getLowJudgment()); + } + if (other.getLowerJudgment() != 0) { + setLowerJudgment(other.getLowerJudgment()); + } + if (other.getLowestJudgment() != 0) { + setLowestJudgment(other.getLowestJudgment()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + siteID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + avatarNetStatus_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + stand_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + highestBand_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 49: { + point_ = input.readDouble(); + bitField0_ |= 0x00000020; + break; + } // case 49 + case 57: { + hitPoints_ = input.readDouble(); + bitField0_ |= 0x00000040; + break; + } // case 57 + case 64: { + isFailed_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + lastJudged_ = input.readInt32(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + net.taehui.EventClass.Event.NetDrawing m = + input.readMessage( + net.taehui.EventClass.Event.NetDrawing.parser(), + extensionRegistry); + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.add(m); + } else { + drawingsBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: { + input.readMessage( + getDrawingComponentFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000400; + break; + } // case 90 + case 98: { + title_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000800; + break; + } // case 98 + case 106: { + artist_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00001000; + break; + } // case 106 + case 114: { + genre_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00002000; + break; + } // case 114 + case 120: { + level_ = input.readInt32(); + bitField0_ |= 0x00004000; + break; + } // case 120 + case 130: { + levelText_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00008000; + break; + } // case 130 + case 138: { + wantLevelID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00010000; + break; + } // case 138 + case 144: { + autoMode_ = input.readInt32(); + bitField0_ |= 0x00020000; + break; + } // case 144 + case 152: { + noteSaltMode_ = input.readInt32(); + bitField0_ |= 0x00040000; + break; + } // case 152 + case 161: { + audioMultiplier_ = input.readDouble(); + bitField0_ |= 0x00080000; + break; + } // case 161 + case 168: { + faintNoteMode_ = input.readInt32(); + bitField0_ |= 0x00100000; + break; + } // case 168 + case 176: { + judgmentMode_ = input.readInt32(); + bitField0_ |= 0x00200000; + break; + } // case 176 + case 184: { + hitPointsMode_ = input.readInt32(); + bitField0_ |= 0x00400000; + break; + } // case 184 + case 192: { + noteMobilityMode_ = input.readInt32(); + bitField0_ |= 0x00800000; + break; + } // case 192 + case 200: { + longNoteMode_ = input.readInt32(); + bitField0_ |= 0x01000000; + break; + } // case 200 + case 208: { + inputFavorMode_ = input.readInt32(); + bitField0_ |= 0x02000000; + break; + } // case 208 + case 216: { + noteModifyMode_ = input.readInt32(); + bitField0_ |= 0x04000000; + break; + } // case 216 + case 224: { + bpmMode_ = input.readInt32(); + bitField0_ |= 0x08000000; + break; + } // case 224 + case 232: { + waveMode_ = input.readInt32(); + bitField0_ |= 0x10000000; + break; + } // case 232 + case 240: { + setNoteMode_ = input.readInt32(); + bitField0_ |= 0x20000000; + break; + } // case 240 + case 248: { + lowestJudgmentConditionMode_ = input.readInt32(); + bitField0_ |= 0x40000000; + break; + } // case 248 + case 256: { + totalNotes_ = input.readInt32(); + bitField0_ |= 0x80000000; + break; + } // case 256 + case 265: { + judgmentStage_ = input.readDouble(); + bitField1_ |= 0x00000001; + break; + } // case 265 + case 273: { + hitPointsValue_ = input.readDouble(); + bitField1_ |= 0x00000002; + break; + } // case 273 + case 280: { + highestInputCount_ = input.readInt32(); + bitField1_ |= 0x00000004; + break; + } // case 280 + case 289: { + length_ = input.readDouble(); + bitField1_ |= 0x00000008; + break; + } // case 289 + case 297: { + bpm_ = input.readDouble(); + bitField1_ |= 0x00000010; + break; + } // case 297 + case 305: { + multiplier_ = input.readDouble(); + bitField1_ |= 0x00000020; + break; + } // case 305 + case 312: { + inputMode_ = input.readInt32(); + bitField1_ |= 0x00000040; + break; + } // case 312 + case 321: { + highestJudgment0_ = input.readDouble(); + bitField1_ |= 0x00000080; + break; + } // case 321 + case 329: { + higherJudgment0_ = input.readDouble(); + bitField1_ |= 0x00000100; + break; + } // case 329 + case 337: { + highJudgment0_ = input.readDouble(); + bitField1_ |= 0x00000200; + break; + } // case 337 + case 345: { + lowJudgment0_ = input.readDouble(); + bitField1_ |= 0x00000400; + break; + } // case 345 + case 353: { + lowerJudgment0_ = input.readDouble(); + bitField1_ |= 0x00000800; + break; + } // case 353 + case 361: { + lowestJudgment0_ = input.readDouble(); + bitField1_ |= 0x00001000; + break; + } // case 361 + case 369: { + highestJudgment1_ = input.readDouble(); + bitField1_ |= 0x00002000; + break; + } // case 369 + case 377: { + higherJudgment1_ = input.readDouble(); + bitField1_ |= 0x00004000; + break; + } // case 377 + case 385: { + highJudgment1_ = input.readDouble(); + bitField1_ |= 0x00008000; + break; + } // case 385 + case 393: { + lowJudgment1_ = input.readDouble(); + bitField1_ |= 0x00010000; + break; + } // case 393 + case 401: { + lowerJudgment1_ = input.readDouble(); + bitField1_ |= 0x00020000; + break; + } // case 401 + case 409: { + lowestJudgment1_ = input.readDouble(); + bitField1_ |= 0x00040000; + break; + } // case 409 + case 416: { + highestJudgment_ = input.readInt32(); + bitField1_ |= 0x00080000; + break; + } // case 416 + case 424: { + higherJudgment_ = input.readInt32(); + bitField1_ |= 0x00100000; + break; + } // case 424 + case 432: { + highJudgment_ = input.readInt32(); + bitField1_ |= 0x00200000; + break; + } // case 432 + case 440: { + lowJudgment_ = input.readInt32(); + bitField1_ |= 0x00400000; + break; + } // case 440 + case 448: { + lowerJudgment_ = input.readInt32(); + bitField1_ |= 0x00800000; + break; + } // case 448 + case 456: { + lowestJudgment_ = input.readInt32(); + bitField1_ |= 0x01000000; + break; + } // case 456 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + private int bitField1_; + + private java.lang.Object siteID_ = ""; + /** + * string siteID = 1; + * @return The siteID. + */ + public java.lang.String getSiteID() { + java.lang.Object ref = siteID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + public com.google.protobuf.ByteString + getSiteIDBytes() { + java.lang.Object ref = siteID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string siteID = 1; + * @param value The siteID to set. + * @return This builder for chaining. + */ + public Builder setSiteID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + siteID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string siteID = 1; + * @return This builder for chaining. + */ + public Builder clearSiteID() { + siteID_ = getDefaultInstance().getSiteID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string siteID = 1; + * @param value The bytes for siteID to set. + * @return This builder for chaining. + */ + public Builder setSiteIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + siteID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 2; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int avatarNetStatus_ = 0; + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @return The enum numeric value on the wire for avatarNetStatus. + */ + @java.lang.Override public int getAvatarNetStatusValue() { + return avatarNetStatus_; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @param value The enum numeric value on the wire for avatarNetStatus to set. + * @return This builder for chaining. + */ + public Builder setAvatarNetStatusValue(int value) { + avatarNetStatus_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @return The avatarNetStatus. + */ + @java.lang.Override + public net.taehui.EventClass.Event.AvatarNetStatus getAvatarNetStatus() { + net.taehui.EventClass.Event.AvatarNetStatus result = net.taehui.EventClass.Event.AvatarNetStatus.forNumber(avatarNetStatus_); + return result == null ? net.taehui.EventClass.Event.AvatarNetStatus.UNRECOGNIZED : result; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @param value The avatarNetStatus to set. + * @return This builder for chaining. + */ + public Builder setAvatarNetStatus(net.taehui.EventClass.Event.AvatarNetStatus value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + avatarNetStatus_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .Event.AvatarNetStatus avatarNetStatus = 3; + * @return This builder for chaining. + */ + public Builder clearAvatarNetStatus() { + bitField0_ = (bitField0_ & ~0x00000004); + avatarNetStatus_ = 0; + onChanged(); + return this; + } + + private int stand_ ; + /** + * int32 stand = 4; + * @return The stand. + */ + @java.lang.Override + public int getStand() { + return stand_; + } + /** + * int32 stand = 4; + * @param value The stand to set. + * @return This builder for chaining. + */ + public Builder setStand(int value) { + + stand_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 stand = 4; + * @return This builder for chaining. + */ + public Builder clearStand() { + bitField0_ = (bitField0_ & ~0x00000008); + stand_ = 0; + onChanged(); + return this; + } + + private int highestBand_ ; + /** + * int32 highestBand = 5; + * @return The highestBand. + */ + @java.lang.Override + public int getHighestBand() { + return highestBand_; + } + /** + * int32 highestBand = 5; + * @param value The highestBand to set. + * @return This builder for chaining. + */ + public Builder setHighestBand(int value) { + + highestBand_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 highestBand = 5; + * @return This builder for chaining. + */ + public Builder clearHighestBand() { + bitField0_ = (bitField0_ & ~0x00000010); + highestBand_ = 0; + onChanged(); + return this; + } + + private double point_ ; + /** + * double point = 6; + * @return The point. + */ + @java.lang.Override + public double getPoint() { + return point_; + } + /** + * double point = 6; + * @param value The point to set. + * @return This builder for chaining. + */ + public Builder setPoint(double value) { + + point_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * double point = 6; + * @return This builder for chaining. + */ + public Builder clearPoint() { + bitField0_ = (bitField0_ & ~0x00000020); + point_ = 0D; + onChanged(); + return this; + } + + private double hitPoints_ ; + /** + * double hitPoints = 7; + * @return The hitPoints. + */ + @java.lang.Override + public double getHitPoints() { + return hitPoints_; + } + /** + * double hitPoints = 7; + * @param value The hitPoints to set. + * @return This builder for chaining. + */ + public Builder setHitPoints(double value) { + + hitPoints_ = value; + bitField0_ |= 0x00000040; + onChanged(); + return this; + } + /** + * double hitPoints = 7; + * @return This builder for chaining. + */ + public Builder clearHitPoints() { + bitField0_ = (bitField0_ & ~0x00000040); + hitPoints_ = 0D; + onChanged(); + return this; + } + + private boolean isFailed_ ; + /** + * bool isFailed = 8; + * @return The isFailed. + */ + @java.lang.Override + public boolean getIsFailed() { + return isFailed_; + } + /** + * bool isFailed = 8; + * @param value The isFailed to set. + * @return This builder for chaining. + */ + public Builder setIsFailed(boolean value) { + + isFailed_ = value; + bitField0_ |= 0x00000080; + onChanged(); + return this; + } + /** + * bool isFailed = 8; + * @return This builder for chaining. + */ + public Builder clearIsFailed() { + bitField0_ = (bitField0_ & ~0x00000080); + isFailed_ = false; + onChanged(); + return this; + } + + private int lastJudged_ ; + /** + * int32 lastJudged = 9; + * @return The lastJudged. + */ + @java.lang.Override + public int getLastJudged() { + return lastJudged_; + } + /** + * int32 lastJudged = 9; + * @param value The lastJudged to set. + * @return This builder for chaining. + */ + public Builder setLastJudged(int value) { + + lastJudged_ = value; + bitField0_ |= 0x00000100; + onChanged(); + return this; + } + /** + * int32 lastJudged = 9; + * @return This builder for chaining. + */ + public Builder clearLastJudged() { + bitField0_ = (bitField0_ & ~0x00000100); + lastJudged_ = 0; + onChanged(); + return this; + } + + private java.util.List drawings_ = + java.util.Collections.emptyList(); + private void ensureDrawingsIsMutable() { + if (!((bitField0_ & 0x00000200) != 0)) { + drawings_ = new java.util.ArrayList(drawings_); + bitField0_ |= 0x00000200; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.NetDrawing, net.taehui.EventClass.Event.NetDrawing.Builder, net.taehui.EventClass.Event.NetDrawingOrBuilder> drawingsBuilder_; + + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public java.util.List getDrawingsList() { + if (drawingsBuilder_ == null) { + return java.util.Collections.unmodifiableList(drawings_); + } else { + return drawingsBuilder_.getMessageList(); + } + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public int getDrawingsCount() { + if (drawingsBuilder_ == null) { + return drawings_.size(); + } else { + return drawingsBuilder_.getCount(); + } + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public net.taehui.EventClass.Event.NetDrawing getDrawings(int index) { + if (drawingsBuilder_ == null) { + return drawings_.get(index); + } else { + return drawingsBuilder_.getMessage(index); + } + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder setDrawings( + int index, net.taehui.EventClass.Event.NetDrawing value) { + if (drawingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDrawingsIsMutable(); + drawings_.set(index, value); + onChanged(); + } else { + drawingsBuilder_.setMessage(index, value); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder setDrawings( + int index, net.taehui.EventClass.Event.NetDrawing.Builder builderForValue) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.set(index, builderForValue.build()); + onChanged(); + } else { + drawingsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder addDrawings(net.taehui.EventClass.Event.NetDrawing value) { + if (drawingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDrawingsIsMutable(); + drawings_.add(value); + onChanged(); + } else { + drawingsBuilder_.addMessage(value); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder addDrawings( + int index, net.taehui.EventClass.Event.NetDrawing value) { + if (drawingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDrawingsIsMutable(); + drawings_.add(index, value); + onChanged(); + } else { + drawingsBuilder_.addMessage(index, value); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder addDrawings( + net.taehui.EventClass.Event.NetDrawing.Builder builderForValue) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.add(builderForValue.build()); + onChanged(); + } else { + drawingsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder addDrawings( + int index, net.taehui.EventClass.Event.NetDrawing.Builder builderForValue) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.add(index, builderForValue.build()); + onChanged(); + } else { + drawingsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder addAllDrawings( + java.lang.Iterable values) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, drawings_); + onChanged(); + } else { + drawingsBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder clearDrawings() { + if (drawingsBuilder_ == null) { + drawings_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000200); + onChanged(); + } else { + drawingsBuilder_.clear(); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public Builder removeDrawings(int index) { + if (drawingsBuilder_ == null) { + ensureDrawingsIsMutable(); + drawings_.remove(index); + onChanged(); + } else { + drawingsBuilder_.remove(index); + } + return this; + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public net.taehui.EventClass.Event.NetDrawing.Builder getDrawingsBuilder( + int index) { + return getDrawingsFieldBuilder().getBuilder(index); + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public net.taehui.EventClass.Event.NetDrawingOrBuilder getDrawingsOrBuilder( + int index) { + if (drawingsBuilder_ == null) { + return drawings_.get(index); } else { + return drawingsBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public java.util.List + getDrawingsOrBuilderList() { + if (drawingsBuilder_ != null) { + return drawingsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(drawings_); + } + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public net.taehui.EventClass.Event.NetDrawing.Builder addDrawingsBuilder() { + return getDrawingsFieldBuilder().addBuilder( + net.taehui.EventClass.Event.NetDrawing.getDefaultInstance()); + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public net.taehui.EventClass.Event.NetDrawing.Builder addDrawingsBuilder( + int index) { + return getDrawingsFieldBuilder().addBuilder( + index, net.taehui.EventClass.Event.NetDrawing.getDefaultInstance()); + } + /** + * repeated .Event.NetDrawing drawings = 10; + */ + public java.util.List + getDrawingsBuilderList() { + return getDrawingsFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.NetDrawing, net.taehui.EventClass.Event.NetDrawing.Builder, net.taehui.EventClass.Event.NetDrawingOrBuilder> + getDrawingsFieldBuilder() { + if (drawingsBuilder_ == null) { + drawingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< + net.taehui.EventClass.Event.NetDrawing, net.taehui.EventClass.Event.NetDrawing.Builder, net.taehui.EventClass.Event.NetDrawingOrBuilder>( + drawings_, + ((bitField0_ & 0x00000200) != 0), + getParentForChildren(), + isClean()); + drawings_ = null; + } + return drawingsBuilder_; + } + + private net.taehui.EventClass.Event.DrawingComponent drawingComponent_; + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.DrawingComponent, net.taehui.EventClass.Event.DrawingComponent.Builder, net.taehui.EventClass.Event.DrawingComponentOrBuilder> drawingComponentBuilder_; + /** + * .Event.DrawingComponent drawingComponent = 11; + * @return Whether the drawingComponent field is set. + */ + public boolean hasDrawingComponent() { + return ((bitField0_ & 0x00000400) != 0); + } + /** + * .Event.DrawingComponent drawingComponent = 11; + * @return The drawingComponent. + */ + public net.taehui.EventClass.Event.DrawingComponent getDrawingComponent() { + if (drawingComponentBuilder_ == null) { + return drawingComponent_ == null ? net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance() : drawingComponent_; + } else { + return drawingComponentBuilder_.getMessage(); + } + } + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + public Builder setDrawingComponent(net.taehui.EventClass.Event.DrawingComponent value) { + if (drawingComponentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + drawingComponent_ = value; + } else { + drawingComponentBuilder_.setMessage(value); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + public Builder setDrawingComponent( + net.taehui.EventClass.Event.DrawingComponent.Builder builderForValue) { + if (drawingComponentBuilder_ == null) { + drawingComponent_ = builderForValue.build(); + } else { + drawingComponentBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000400; + onChanged(); + return this; + } + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + public Builder mergeDrawingComponent(net.taehui.EventClass.Event.DrawingComponent value) { + if (drawingComponentBuilder_ == null) { + if (((bitField0_ & 0x00000400) != 0) && + drawingComponent_ != null && + drawingComponent_ != net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance()) { + getDrawingComponentBuilder().mergeFrom(value); + } else { + drawingComponent_ = value; + } + } else { + drawingComponentBuilder_.mergeFrom(value); + } + if (drawingComponent_ != null) { + bitField0_ |= 0x00000400; + onChanged(); + } + return this; + } + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + public Builder clearDrawingComponent() { + bitField0_ = (bitField0_ & ~0x00000400); + drawingComponent_ = null; + if (drawingComponentBuilder_ != null) { + drawingComponentBuilder_.dispose(); + drawingComponentBuilder_ = null; + } + onChanged(); + return this; + } + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + public net.taehui.EventClass.Event.DrawingComponent.Builder getDrawingComponentBuilder() { + bitField0_ |= 0x00000400; + onChanged(); + return getDrawingComponentFieldBuilder().getBuilder(); + } + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + public net.taehui.EventClass.Event.DrawingComponentOrBuilder getDrawingComponentOrBuilder() { + if (drawingComponentBuilder_ != null) { + return drawingComponentBuilder_.getMessageOrBuilder(); + } else { + return drawingComponent_ == null ? + net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance() : drawingComponent_; + } + } + /** + * .Event.DrawingComponent drawingComponent = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.DrawingComponent, net.taehui.EventClass.Event.DrawingComponent.Builder, net.taehui.EventClass.Event.DrawingComponentOrBuilder> + getDrawingComponentFieldBuilder() { + if (drawingComponentBuilder_ == null) { + drawingComponentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.DrawingComponent, net.taehui.EventClass.Event.DrawingComponent.Builder, net.taehui.EventClass.Event.DrawingComponentOrBuilder>( + getDrawingComponent(), + getParentForChildren(), + isClean()); + drawingComponent_ = null; + } + return drawingComponentBuilder_; + } + + private java.lang.Object title_ = ""; + /** + * string title = 12; + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string title = 12; + * @return The bytes for title. + */ + public com.google.protobuf.ByteString + getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string title = 12; + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + title_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + /** + * string title = 12; + * @return This builder for chaining. + */ + public Builder clearTitle() { + title_ = getDefaultInstance().getTitle(); + bitField0_ = (bitField0_ & ~0x00000800); + onChanged(); + return this; + } + /** + * string title = 12; + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + title_ = value; + bitField0_ |= 0x00000800; + onChanged(); + return this; + } + + private java.lang.Object artist_ = ""; + /** + * string artist = 13; + * @return The artist. + */ + public java.lang.String getArtist() { + java.lang.Object ref = artist_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + artist_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string artist = 13; + * @return The bytes for artist. + */ + public com.google.protobuf.ByteString + getArtistBytes() { + java.lang.Object ref = artist_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + artist_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string artist = 13; + * @param value The artist to set. + * @return This builder for chaining. + */ + public Builder setArtist( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + artist_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + /** + * string artist = 13; + * @return This builder for chaining. + */ + public Builder clearArtist() { + artist_ = getDefaultInstance().getArtist(); + bitField0_ = (bitField0_ & ~0x00001000); + onChanged(); + return this; + } + /** + * string artist = 13; + * @param value The bytes for artist to set. + * @return This builder for chaining. + */ + public Builder setArtistBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + artist_ = value; + bitField0_ |= 0x00001000; + onChanged(); + return this; + } + + private java.lang.Object genre_ = ""; + /** + * string genre = 14; + * @return The genre. + */ + public java.lang.String getGenre() { + java.lang.Object ref = genre_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + genre_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string genre = 14; + * @return The bytes for genre. + */ + public com.google.protobuf.ByteString + getGenreBytes() { + java.lang.Object ref = genre_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + genre_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string genre = 14; + * @param value The genre to set. + * @return This builder for chaining. + */ + public Builder setGenre( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + genre_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + /** + * string genre = 14; + * @return This builder for chaining. + */ + public Builder clearGenre() { + genre_ = getDefaultInstance().getGenre(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + return this; + } + /** + * string genre = 14; + * @param value The bytes for genre to set. + * @return This builder for chaining. + */ + public Builder setGenreBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + genre_ = value; + bitField0_ |= 0x00002000; + onChanged(); + return this; + } + + private int level_ ; + /** + * int32 level = 15; + * @return The level. + */ + @java.lang.Override + public int getLevel() { + return level_; + } + /** + * int32 level = 15; + * @param value The level to set. + * @return This builder for chaining. + */ + public Builder setLevel(int value) { + + level_ = value; + bitField0_ |= 0x00004000; + onChanged(); + return this; + } + /** + * int32 level = 15; + * @return This builder for chaining. + */ + public Builder clearLevel() { + bitField0_ = (bitField0_ & ~0x00004000); + level_ = 0; + onChanged(); + return this; + } + + private java.lang.Object levelText_ = ""; + /** + * string levelText = 16; + * @return The levelText. + */ + public java.lang.String getLevelText() { + java.lang.Object ref = levelText_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + levelText_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string levelText = 16; + * @return The bytes for levelText. + */ + public com.google.protobuf.ByteString + getLevelTextBytes() { + java.lang.Object ref = levelText_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + levelText_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string levelText = 16; + * @param value The levelText to set. + * @return This builder for chaining. + */ + public Builder setLevelText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + levelText_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + /** + * string levelText = 16; + * @return This builder for chaining. + */ + public Builder clearLevelText() { + levelText_ = getDefaultInstance().getLevelText(); + bitField0_ = (bitField0_ & ~0x00008000); + onChanged(); + return this; + } + /** + * string levelText = 16; + * @param value The bytes for levelText to set. + * @return This builder for chaining. + */ + public Builder setLevelTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + levelText_ = value; + bitField0_ |= 0x00008000; + onChanged(); + return this; + } + + private java.lang.Object wantLevelID_ = ""; + /** + * string wantLevelID = 17; + * @return The wantLevelID. + */ + public java.lang.String getWantLevelID() { + java.lang.Object ref = wantLevelID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + wantLevelID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string wantLevelID = 17; + * @return The bytes for wantLevelID. + */ + public com.google.protobuf.ByteString + getWantLevelIDBytes() { + java.lang.Object ref = wantLevelID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + wantLevelID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string wantLevelID = 17; + * @param value The wantLevelID to set. + * @return This builder for chaining. + */ + public Builder setWantLevelID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + wantLevelID_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + /** + * string wantLevelID = 17; + * @return This builder for chaining. + */ + public Builder clearWantLevelID() { + wantLevelID_ = getDefaultInstance().getWantLevelID(); + bitField0_ = (bitField0_ & ~0x00010000); + onChanged(); + return this; + } + /** + * string wantLevelID = 17; + * @param value The bytes for wantLevelID to set. + * @return This builder for chaining. + */ + public Builder setWantLevelIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + wantLevelID_ = value; + bitField0_ |= 0x00010000; + onChanged(); + return this; + } + + private int autoMode_ ; + /** + * int32 autoMode = 18; + * @return The autoMode. + */ + @java.lang.Override + public int getAutoMode() { + return autoMode_; + } + /** + * int32 autoMode = 18; + * @param value The autoMode to set. + * @return This builder for chaining. + */ + public Builder setAutoMode(int value) { + + autoMode_ = value; + bitField0_ |= 0x00020000; + onChanged(); + return this; + } + /** + * int32 autoMode = 18; + * @return This builder for chaining. + */ + public Builder clearAutoMode() { + bitField0_ = (bitField0_ & ~0x00020000); + autoMode_ = 0; + onChanged(); + return this; + } + + private int noteSaltMode_ ; + /** + * int32 noteSaltMode = 19; + * @return The noteSaltMode. + */ + @java.lang.Override + public int getNoteSaltMode() { + return noteSaltMode_; + } + /** + * int32 noteSaltMode = 19; + * @param value The noteSaltMode to set. + * @return This builder for chaining. + */ + public Builder setNoteSaltMode(int value) { + + noteSaltMode_ = value; + bitField0_ |= 0x00040000; + onChanged(); + return this; + } + /** + * int32 noteSaltMode = 19; + * @return This builder for chaining. + */ + public Builder clearNoteSaltMode() { + bitField0_ = (bitField0_ & ~0x00040000); + noteSaltMode_ = 0; + onChanged(); + return this; + } + + private double audioMultiplier_ ; + /** + * double audioMultiplier = 20; + * @return The audioMultiplier. + */ + @java.lang.Override + public double getAudioMultiplier() { + return audioMultiplier_; + } + /** + * double audioMultiplier = 20; + * @param value The audioMultiplier to set. + * @return This builder for chaining. + */ + public Builder setAudioMultiplier(double value) { + + audioMultiplier_ = value; + bitField0_ |= 0x00080000; + onChanged(); + return this; + } + /** + * double audioMultiplier = 20; + * @return This builder for chaining. + */ + public Builder clearAudioMultiplier() { + bitField0_ = (bitField0_ & ~0x00080000); + audioMultiplier_ = 0D; + onChanged(); + return this; + } + + private int faintNoteMode_ ; + /** + * int32 faintNoteMode = 21; + * @return The faintNoteMode. + */ + @java.lang.Override + public int getFaintNoteMode() { + return faintNoteMode_; + } + /** + * int32 faintNoteMode = 21; + * @param value The faintNoteMode to set. + * @return This builder for chaining. + */ + public Builder setFaintNoteMode(int value) { + + faintNoteMode_ = value; + bitField0_ |= 0x00100000; + onChanged(); + return this; + } + /** + * int32 faintNoteMode = 21; + * @return This builder for chaining. + */ + public Builder clearFaintNoteMode() { + bitField0_ = (bitField0_ & ~0x00100000); + faintNoteMode_ = 0; + onChanged(); + return this; + } + + private int judgmentMode_ ; + /** + * int32 judgmentMode = 22; + * @return The judgmentMode. + */ + @java.lang.Override + public int getJudgmentMode() { + return judgmentMode_; + } + /** + * int32 judgmentMode = 22; + * @param value The judgmentMode to set. + * @return This builder for chaining. + */ + public Builder setJudgmentMode(int value) { + + judgmentMode_ = value; + bitField0_ |= 0x00200000; + onChanged(); + return this; + } + /** + * int32 judgmentMode = 22; + * @return This builder for chaining. + */ + public Builder clearJudgmentMode() { + bitField0_ = (bitField0_ & ~0x00200000); + judgmentMode_ = 0; + onChanged(); + return this; + } + + private int hitPointsMode_ ; + /** + * int32 hitPointsMode = 23; + * @return The hitPointsMode. + */ + @java.lang.Override + public int getHitPointsMode() { + return hitPointsMode_; + } + /** + * int32 hitPointsMode = 23; + * @param value The hitPointsMode to set. + * @return This builder for chaining. + */ + public Builder setHitPointsMode(int value) { + + hitPointsMode_ = value; + bitField0_ |= 0x00400000; + onChanged(); + return this; + } + /** + * int32 hitPointsMode = 23; + * @return This builder for chaining. + */ + public Builder clearHitPointsMode() { + bitField0_ = (bitField0_ & ~0x00400000); + hitPointsMode_ = 0; + onChanged(); + return this; + } + + private int noteMobilityMode_ ; + /** + * int32 noteMobilityMode = 24; + * @return The noteMobilityMode. + */ + @java.lang.Override + public int getNoteMobilityMode() { + return noteMobilityMode_; + } + /** + * int32 noteMobilityMode = 24; + * @param value The noteMobilityMode to set. + * @return This builder for chaining. + */ + public Builder setNoteMobilityMode(int value) { + + noteMobilityMode_ = value; + bitField0_ |= 0x00800000; + onChanged(); + return this; + } + /** + * int32 noteMobilityMode = 24; + * @return This builder for chaining. + */ + public Builder clearNoteMobilityMode() { + bitField0_ = (bitField0_ & ~0x00800000); + noteMobilityMode_ = 0; + onChanged(); + return this; + } + + private int longNoteMode_ ; + /** + * int32 longNoteMode = 25; + * @return The longNoteMode. + */ + @java.lang.Override + public int getLongNoteMode() { + return longNoteMode_; + } + /** + * int32 longNoteMode = 25; + * @param value The longNoteMode to set. + * @return This builder for chaining. + */ + public Builder setLongNoteMode(int value) { + + longNoteMode_ = value; + bitField0_ |= 0x01000000; + onChanged(); + return this; + } + /** + * int32 longNoteMode = 25; + * @return This builder for chaining. + */ + public Builder clearLongNoteMode() { + bitField0_ = (bitField0_ & ~0x01000000); + longNoteMode_ = 0; + onChanged(); + return this; + } + + private int inputFavorMode_ ; + /** + * int32 inputFavorMode = 26; + * @return The inputFavorMode. + */ + @java.lang.Override + public int getInputFavorMode() { + return inputFavorMode_; + } + /** + * int32 inputFavorMode = 26; + * @param value The inputFavorMode to set. + * @return This builder for chaining. + */ + public Builder setInputFavorMode(int value) { + + inputFavorMode_ = value; + bitField0_ |= 0x02000000; + onChanged(); + return this; + } + /** + * int32 inputFavorMode = 26; + * @return This builder for chaining. + */ + public Builder clearInputFavorMode() { + bitField0_ = (bitField0_ & ~0x02000000); + inputFavorMode_ = 0; + onChanged(); + return this; + } + + private int noteModifyMode_ ; + /** + * int32 noteModifyMode = 27; + * @return The noteModifyMode. + */ + @java.lang.Override + public int getNoteModifyMode() { + return noteModifyMode_; + } + /** + * int32 noteModifyMode = 27; + * @param value The noteModifyMode to set. + * @return This builder for chaining. + */ + public Builder setNoteModifyMode(int value) { + + noteModifyMode_ = value; + bitField0_ |= 0x04000000; + onChanged(); + return this; + } + /** + * int32 noteModifyMode = 27; + * @return This builder for chaining. + */ + public Builder clearNoteModifyMode() { + bitField0_ = (bitField0_ & ~0x04000000); + noteModifyMode_ = 0; + onChanged(); + return this; + } + + private int bpmMode_ ; + /** + * int32 bpmMode = 28; + * @return The bpmMode. + */ + @java.lang.Override + public int getBpmMode() { + return bpmMode_; + } + /** + * int32 bpmMode = 28; + * @param value The bpmMode to set. + * @return This builder for chaining. + */ + public Builder setBpmMode(int value) { + + bpmMode_ = value; + bitField0_ |= 0x08000000; + onChanged(); + return this; + } + /** + * int32 bpmMode = 28; + * @return This builder for chaining. + */ + public Builder clearBpmMode() { + bitField0_ = (bitField0_ & ~0x08000000); + bpmMode_ = 0; + onChanged(); + return this; + } + + private int waveMode_ ; + /** + * int32 waveMode = 29; + * @return The waveMode. + */ + @java.lang.Override + public int getWaveMode() { + return waveMode_; + } + /** + * int32 waveMode = 29; + * @param value The waveMode to set. + * @return This builder for chaining. + */ + public Builder setWaveMode(int value) { + + waveMode_ = value; + bitField0_ |= 0x10000000; + onChanged(); + return this; + } + /** + * int32 waveMode = 29; + * @return This builder for chaining. + */ + public Builder clearWaveMode() { + bitField0_ = (bitField0_ & ~0x10000000); + waveMode_ = 0; + onChanged(); + return this; + } + + private int setNoteMode_ ; + /** + * int32 setNoteMode = 30; + * @return The setNoteMode. + */ + @java.lang.Override + public int getSetNoteMode() { + return setNoteMode_; + } + /** + * int32 setNoteMode = 30; + * @param value The setNoteMode to set. + * @return This builder for chaining. + */ + public Builder setSetNoteMode(int value) { + + setNoteMode_ = value; + bitField0_ |= 0x20000000; + onChanged(); + return this; + } + /** + * int32 setNoteMode = 30; + * @return This builder for chaining. + */ + public Builder clearSetNoteMode() { + bitField0_ = (bitField0_ & ~0x20000000); + setNoteMode_ = 0; + onChanged(); + return this; + } + + private int lowestJudgmentConditionMode_ ; + /** + * int32 lowestJudgmentConditionMode = 31; + * @return The lowestJudgmentConditionMode. + */ + @java.lang.Override + public int getLowestJudgmentConditionMode() { + return lowestJudgmentConditionMode_; + } + /** + * int32 lowestJudgmentConditionMode = 31; + * @param value The lowestJudgmentConditionMode to set. + * @return This builder for chaining. + */ + public Builder setLowestJudgmentConditionMode(int value) { + + lowestJudgmentConditionMode_ = value; + bitField0_ |= 0x40000000; + onChanged(); + return this; + } + /** + * int32 lowestJudgmentConditionMode = 31; + * @return This builder for chaining. + */ + public Builder clearLowestJudgmentConditionMode() { + bitField0_ = (bitField0_ & ~0x40000000); + lowestJudgmentConditionMode_ = 0; + onChanged(); + return this; + } + + private int totalNotes_ ; + /** + * int32 totalNotes = 32; + * @return The totalNotes. + */ + @java.lang.Override + public int getTotalNotes() { + return totalNotes_; + } + /** + * int32 totalNotes = 32; + * @param value The totalNotes to set. + * @return This builder for chaining. + */ + public Builder setTotalNotes(int value) { + + totalNotes_ = value; + bitField0_ |= 0x80000000; + onChanged(); + return this; + } + /** + * int32 totalNotes = 32; + * @return This builder for chaining. + */ + public Builder clearTotalNotes() { + bitField0_ = (bitField0_ & ~0x80000000); + totalNotes_ = 0; + onChanged(); + return this; + } + + private double judgmentStage_ ; + /** + * double judgmentStage = 33; + * @return The judgmentStage. + */ + @java.lang.Override + public double getJudgmentStage() { + return judgmentStage_; + } + /** + * double judgmentStage = 33; + * @param value The judgmentStage to set. + * @return This builder for chaining. + */ + public Builder setJudgmentStage(double value) { + + judgmentStage_ = value; + bitField1_ |= 0x00000001; + onChanged(); + return this; + } + /** + * double judgmentStage = 33; + * @return This builder for chaining. + */ + public Builder clearJudgmentStage() { + bitField1_ = (bitField1_ & ~0x00000001); + judgmentStage_ = 0D; + onChanged(); + return this; + } + + private double hitPointsValue_ ; + /** + * double hitPointsValue = 34; + * @return The hitPointsValue. + */ + @java.lang.Override + public double getHitPointsValue() { + return hitPointsValue_; + } + /** + * double hitPointsValue = 34; + * @param value The hitPointsValue to set. + * @return This builder for chaining. + */ + public Builder setHitPointsValue(double value) { + + hitPointsValue_ = value; + bitField1_ |= 0x00000002; + onChanged(); + return this; + } + /** + * double hitPointsValue = 34; + * @return This builder for chaining. + */ + public Builder clearHitPointsValue() { + bitField1_ = (bitField1_ & ~0x00000002); + hitPointsValue_ = 0D; + onChanged(); + return this; + } + + private int highestInputCount_ ; + /** + * int32 highestInputCount = 35; + * @return The highestInputCount. + */ + @java.lang.Override + public int getHighestInputCount() { + return highestInputCount_; + } + /** + * int32 highestInputCount = 35; + * @param value The highestInputCount to set. + * @return This builder for chaining. + */ + public Builder setHighestInputCount(int value) { + + highestInputCount_ = value; + bitField1_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 highestInputCount = 35; + * @return This builder for chaining. + */ + public Builder clearHighestInputCount() { + bitField1_ = (bitField1_ & ~0x00000004); + highestInputCount_ = 0; + onChanged(); + return this; + } + + private double length_ ; + /** + * double length = 36; + * @return The length. + */ + @java.lang.Override + public double getLength() { + return length_; + } + /** + * double length = 36; + * @param value The length to set. + * @return This builder for chaining. + */ + public Builder setLength(double value) { + + length_ = value; + bitField1_ |= 0x00000008; + onChanged(); + return this; + } + /** + * double length = 36; + * @return This builder for chaining. + */ + public Builder clearLength() { + bitField1_ = (bitField1_ & ~0x00000008); + length_ = 0D; + onChanged(); + return this; + } + + private double bpm_ ; + /** + * double bpm = 37; + * @return The bpm. + */ + @java.lang.Override + public double getBpm() { + return bpm_; + } + /** + * double bpm = 37; + * @param value The bpm to set. + * @return This builder for chaining. + */ + public Builder setBpm(double value) { + + bpm_ = value; + bitField1_ |= 0x00000010; + onChanged(); + return this; + } + /** + * double bpm = 37; + * @return This builder for chaining. + */ + public Builder clearBpm() { + bitField1_ = (bitField1_ & ~0x00000010); + bpm_ = 0D; + onChanged(); + return this; + } + + private double multiplier_ ; + /** + * double multiplier = 38; + * @return The multiplier. + */ + @java.lang.Override + public double getMultiplier() { + return multiplier_; + } + /** + * double multiplier = 38; + * @param value The multiplier to set. + * @return This builder for chaining. + */ + public Builder setMultiplier(double value) { + + multiplier_ = value; + bitField1_ |= 0x00000020; + onChanged(); + return this; + } + /** + * double multiplier = 38; + * @return This builder for chaining. + */ + public Builder clearMultiplier() { + bitField1_ = (bitField1_ & ~0x00000020); + multiplier_ = 0D; + onChanged(); + return this; + } + + private int inputMode_ ; + /** + * int32 inputMode = 39; + * @return The inputMode. + */ + @java.lang.Override + public int getInputMode() { + return inputMode_; + } + /** + * int32 inputMode = 39; + * @param value The inputMode to set. + * @return This builder for chaining. + */ + public Builder setInputMode(int value) { + + inputMode_ = value; + bitField1_ |= 0x00000040; + onChanged(); + return this; + } + /** + * int32 inputMode = 39; + * @return This builder for chaining. + */ + public Builder clearInputMode() { + bitField1_ = (bitField1_ & ~0x00000040); + inputMode_ = 0; + onChanged(); + return this; + } + + private double highestJudgment0_ ; + /** + * double highestJudgment0 = 40; + * @return The highestJudgment0. + */ + @java.lang.Override + public double getHighestJudgment0() { + return highestJudgment0_; + } + /** + * double highestJudgment0 = 40; + * @param value The highestJudgment0 to set. + * @return This builder for chaining. + */ + public Builder setHighestJudgment0(double value) { + + highestJudgment0_ = value; + bitField1_ |= 0x00000080; + onChanged(); + return this; + } + /** + * double highestJudgment0 = 40; + * @return This builder for chaining. + */ + public Builder clearHighestJudgment0() { + bitField1_ = (bitField1_ & ~0x00000080); + highestJudgment0_ = 0D; + onChanged(); + return this; + } + + private double higherJudgment0_ ; + /** + * double higherJudgment0 = 41; + * @return The higherJudgment0. + */ + @java.lang.Override + public double getHigherJudgment0() { + return higherJudgment0_; + } + /** + * double higherJudgment0 = 41; + * @param value The higherJudgment0 to set. + * @return This builder for chaining. + */ + public Builder setHigherJudgment0(double value) { + + higherJudgment0_ = value; + bitField1_ |= 0x00000100; + onChanged(); + return this; + } + /** + * double higherJudgment0 = 41; + * @return This builder for chaining. + */ + public Builder clearHigherJudgment0() { + bitField1_ = (bitField1_ & ~0x00000100); + higherJudgment0_ = 0D; + onChanged(); + return this; + } + + private double highJudgment0_ ; + /** + * double highJudgment0 = 42; + * @return The highJudgment0. + */ + @java.lang.Override + public double getHighJudgment0() { + return highJudgment0_; + } + /** + * double highJudgment0 = 42; + * @param value The highJudgment0 to set. + * @return This builder for chaining. + */ + public Builder setHighJudgment0(double value) { + + highJudgment0_ = value; + bitField1_ |= 0x00000200; + onChanged(); + return this; + } + /** + * double highJudgment0 = 42; + * @return This builder for chaining. + */ + public Builder clearHighJudgment0() { + bitField1_ = (bitField1_ & ~0x00000200); + highJudgment0_ = 0D; + onChanged(); + return this; + } + + private double lowJudgment0_ ; + /** + * double lowJudgment0 = 43; + * @return The lowJudgment0. + */ + @java.lang.Override + public double getLowJudgment0() { + return lowJudgment0_; + } + /** + * double lowJudgment0 = 43; + * @param value The lowJudgment0 to set. + * @return This builder for chaining. + */ + public Builder setLowJudgment0(double value) { + + lowJudgment0_ = value; + bitField1_ |= 0x00000400; + onChanged(); + return this; + } + /** + * double lowJudgment0 = 43; + * @return This builder for chaining. + */ + public Builder clearLowJudgment0() { + bitField1_ = (bitField1_ & ~0x00000400); + lowJudgment0_ = 0D; + onChanged(); + return this; + } + + private double lowerJudgment0_ ; + /** + * double lowerJudgment0 = 44; + * @return The lowerJudgment0. + */ + @java.lang.Override + public double getLowerJudgment0() { + return lowerJudgment0_; + } + /** + * double lowerJudgment0 = 44; + * @param value The lowerJudgment0 to set. + * @return This builder for chaining. + */ + public Builder setLowerJudgment0(double value) { + + lowerJudgment0_ = value; + bitField1_ |= 0x00000800; + onChanged(); + return this; + } + /** + * double lowerJudgment0 = 44; + * @return This builder for chaining. + */ + public Builder clearLowerJudgment0() { + bitField1_ = (bitField1_ & ~0x00000800); + lowerJudgment0_ = 0D; + onChanged(); + return this; + } + + private double lowestJudgment0_ ; + /** + * double lowestJudgment0 = 45; + * @return The lowestJudgment0. + */ + @java.lang.Override + public double getLowestJudgment0() { + return lowestJudgment0_; + } + /** + * double lowestJudgment0 = 45; + * @param value The lowestJudgment0 to set. + * @return This builder for chaining. + */ + public Builder setLowestJudgment0(double value) { + + lowestJudgment0_ = value; + bitField1_ |= 0x00001000; + onChanged(); + return this; + } + /** + * double lowestJudgment0 = 45; + * @return This builder for chaining. + */ + public Builder clearLowestJudgment0() { + bitField1_ = (bitField1_ & ~0x00001000); + lowestJudgment0_ = 0D; + onChanged(); + return this; + } + + private double highestJudgment1_ ; + /** + * double highestJudgment1 = 46; + * @return The highestJudgment1. + */ + @java.lang.Override + public double getHighestJudgment1() { + return highestJudgment1_; + } + /** + * double highestJudgment1 = 46; + * @param value The highestJudgment1 to set. + * @return This builder for chaining. + */ + public Builder setHighestJudgment1(double value) { + + highestJudgment1_ = value; + bitField1_ |= 0x00002000; + onChanged(); + return this; + } + /** + * double highestJudgment1 = 46; + * @return This builder for chaining. + */ + public Builder clearHighestJudgment1() { + bitField1_ = (bitField1_ & ~0x00002000); + highestJudgment1_ = 0D; + onChanged(); + return this; + } + + private double higherJudgment1_ ; + /** + * double higherJudgment1 = 47; + * @return The higherJudgment1. + */ + @java.lang.Override + public double getHigherJudgment1() { + return higherJudgment1_; + } + /** + * double higherJudgment1 = 47; + * @param value The higherJudgment1 to set. + * @return This builder for chaining. + */ + public Builder setHigherJudgment1(double value) { + + higherJudgment1_ = value; + bitField1_ |= 0x00004000; + onChanged(); + return this; + } + /** + * double higherJudgment1 = 47; + * @return This builder for chaining. + */ + public Builder clearHigherJudgment1() { + bitField1_ = (bitField1_ & ~0x00004000); + higherJudgment1_ = 0D; + onChanged(); + return this; + } + + private double highJudgment1_ ; + /** + * double highJudgment1 = 48; + * @return The highJudgment1. + */ + @java.lang.Override + public double getHighJudgment1() { + return highJudgment1_; + } + /** + * double highJudgment1 = 48; + * @param value The highJudgment1 to set. + * @return This builder for chaining. + */ + public Builder setHighJudgment1(double value) { + + highJudgment1_ = value; + bitField1_ |= 0x00008000; + onChanged(); + return this; + } + /** + * double highJudgment1 = 48; + * @return This builder for chaining. + */ + public Builder clearHighJudgment1() { + bitField1_ = (bitField1_ & ~0x00008000); + highJudgment1_ = 0D; + onChanged(); + return this; + } + + private double lowJudgment1_ ; + /** + * double lowJudgment1 = 49; + * @return The lowJudgment1. + */ + @java.lang.Override + public double getLowJudgment1() { + return lowJudgment1_; + } + /** + * double lowJudgment1 = 49; + * @param value The lowJudgment1 to set. + * @return This builder for chaining. + */ + public Builder setLowJudgment1(double value) { + + lowJudgment1_ = value; + bitField1_ |= 0x00010000; + onChanged(); + return this; + } + /** + * double lowJudgment1 = 49; + * @return This builder for chaining. + */ + public Builder clearLowJudgment1() { + bitField1_ = (bitField1_ & ~0x00010000); + lowJudgment1_ = 0D; + onChanged(); + return this; + } + + private double lowerJudgment1_ ; + /** + * double lowerJudgment1 = 50; + * @return The lowerJudgment1. + */ + @java.lang.Override + public double getLowerJudgment1() { + return lowerJudgment1_; + } + /** + * double lowerJudgment1 = 50; + * @param value The lowerJudgment1 to set. + * @return This builder for chaining. + */ + public Builder setLowerJudgment1(double value) { + + lowerJudgment1_ = value; + bitField1_ |= 0x00020000; + onChanged(); + return this; + } + /** + * double lowerJudgment1 = 50; + * @return This builder for chaining. + */ + public Builder clearLowerJudgment1() { + bitField1_ = (bitField1_ & ~0x00020000); + lowerJudgment1_ = 0D; + onChanged(); + return this; + } + + private double lowestJudgment1_ ; + /** + * double lowestJudgment1 = 51; + * @return The lowestJudgment1. + */ + @java.lang.Override + public double getLowestJudgment1() { + return lowestJudgment1_; + } + /** + * double lowestJudgment1 = 51; + * @param value The lowestJudgment1 to set. + * @return This builder for chaining. + */ + public Builder setLowestJudgment1(double value) { + + lowestJudgment1_ = value; + bitField1_ |= 0x00040000; + onChanged(); + return this; + } + /** + * double lowestJudgment1 = 51; + * @return This builder for chaining. + */ + public Builder clearLowestJudgment1() { + bitField1_ = (bitField1_ & ~0x00040000); + lowestJudgment1_ = 0D; + onChanged(); + return this; + } + + private int highestJudgment_ ; + /** + * int32 highestJudgment = 52; + * @return The highestJudgment. + */ + @java.lang.Override + public int getHighestJudgment() { + return highestJudgment_; + } + /** + * int32 highestJudgment = 52; + * @param value The highestJudgment to set. + * @return This builder for chaining. + */ + public Builder setHighestJudgment(int value) { + + highestJudgment_ = value; + bitField1_ |= 0x00080000; + onChanged(); + return this; + } + /** + * int32 highestJudgment = 52; + * @return This builder for chaining. + */ + public Builder clearHighestJudgment() { + bitField1_ = (bitField1_ & ~0x00080000); + highestJudgment_ = 0; + onChanged(); + return this; + } + + private int higherJudgment_ ; + /** + * int32 higherJudgment = 53; + * @return The higherJudgment. + */ + @java.lang.Override + public int getHigherJudgment() { + return higherJudgment_; + } + /** + * int32 higherJudgment = 53; + * @param value The higherJudgment to set. + * @return This builder for chaining. + */ + public Builder setHigherJudgment(int value) { + + higherJudgment_ = value; + bitField1_ |= 0x00100000; + onChanged(); + return this; + } + /** + * int32 higherJudgment = 53; + * @return This builder for chaining. + */ + public Builder clearHigherJudgment() { + bitField1_ = (bitField1_ & ~0x00100000); + higherJudgment_ = 0; + onChanged(); + return this; + } + + private int highJudgment_ ; + /** + * int32 highJudgment = 54; + * @return The highJudgment. + */ + @java.lang.Override + public int getHighJudgment() { + return highJudgment_; + } + /** + * int32 highJudgment = 54; + * @param value The highJudgment to set. + * @return This builder for chaining. + */ + public Builder setHighJudgment(int value) { + + highJudgment_ = value; + bitField1_ |= 0x00200000; + onChanged(); + return this; + } + /** + * int32 highJudgment = 54; + * @return This builder for chaining. + */ + public Builder clearHighJudgment() { + bitField1_ = (bitField1_ & ~0x00200000); + highJudgment_ = 0; + onChanged(); + return this; + } + + private int lowJudgment_ ; + /** + * int32 lowJudgment = 55; + * @return The lowJudgment. + */ + @java.lang.Override + public int getLowJudgment() { + return lowJudgment_; + } + /** + * int32 lowJudgment = 55; + * @param value The lowJudgment to set. + * @return This builder for chaining. + */ + public Builder setLowJudgment(int value) { + + lowJudgment_ = value; + bitField1_ |= 0x00400000; + onChanged(); + return this; + } + /** + * int32 lowJudgment = 55; + * @return This builder for chaining. + */ + public Builder clearLowJudgment() { + bitField1_ = (bitField1_ & ~0x00400000); + lowJudgment_ = 0; + onChanged(); + return this; + } + + private int lowerJudgment_ ; + /** + * int32 lowerJudgment = 56; + * @return The lowerJudgment. + */ + @java.lang.Override + public int getLowerJudgment() { + return lowerJudgment_; + } + /** + * int32 lowerJudgment = 56; + * @param value The lowerJudgment to set. + * @return This builder for chaining. + */ + public Builder setLowerJudgment(int value) { + + lowerJudgment_ = value; + bitField1_ |= 0x00800000; + onChanged(); + return this; + } + /** + * int32 lowerJudgment = 56; + * @return This builder for chaining. + */ + public Builder clearLowerJudgment() { + bitField1_ = (bitField1_ & ~0x00800000); + lowerJudgment_ = 0; + onChanged(); + return this; + } + + private int lowestJudgment_ ; + /** + * int32 lowestJudgment = 57; + * @return The lowestJudgment. + */ + @java.lang.Override + public int getLowestJudgment() { + return lowestJudgment_; + } + /** + * int32 lowestJudgment = 57; + * @param value The lowestJudgment to set. + * @return This builder for chaining. + */ + public Builder setLowestJudgment(int value) { + + lowestJudgment_ = value; + bitField1_ |= 0x01000000; + onChanged(); + return this; + } + /** + * int32 lowestJudgment = 57; + * @return This builder for chaining. + */ + public Builder clearLowestJudgment() { + bitField1_ = (bitField1_ & ~0x01000000); + lowestJudgment_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.QwilightCallNet) + } + + // @@protoc_insertion_point(class_scope:Event.QwilightCallNet) + private static final net.taehui.EventClass.Event.QwilightCallNet DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.QwilightCallNet(); + } + + public static net.taehui.EventClass.Event.QwilightCallNet getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QwilightCallNet parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightCallNet getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface NetDrawingOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.NetDrawing) + com.google.protobuf.MessageOrBuilder { + + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @return The enum numeric value on the wire for drawingVariety. + */ + int getDrawingVarietyValue(); + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @return The drawingVariety. + */ + net.taehui.EventClass.Event.NetDrawing.Variety getDrawingVariety(); + + /** + * uint32 param = 2; + * @return The param. + */ + int getParam(); + + /** + * double position0 = 3; + * @return The position0. + */ + double getPosition0(); + + /** + * double position1 = 4; + * @return The position1. + */ + double getPosition1(); + + /** + * double length = 5; + * @return The length. + */ + double getLength(); + + /** + * double height = 6; + * @return The height. + */ + double getHeight(); + } + /** + * Protobuf type {@code Event.NetDrawing} + */ + public static final class NetDrawing extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.NetDrawing) + NetDrawingOrBuilder { + private static final long serialVersionUID = 0L; + // Use NetDrawing.newBuilder() to construct. + private NetDrawing(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private NetDrawing() { + drawingVariety_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new NetDrawing(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_NetDrawing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_NetDrawing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.NetDrawing.class, net.taehui.EventClass.Event.NetDrawing.Builder.class); + } + + /** + * Protobuf enum {@code Event.NetDrawing.Variety} + */ + public enum Variety + implements com.google.protobuf.ProtocolMessageEnum { + /** + * Note = 0; + */ + Note(0), + /** + * Main = 1; + */ + Main(1), + /** + * Meter = 2; + */ + Meter(2), + UNRECOGNIZED(-1), + ; + + /** + * Note = 0; + */ + public static final int Note_VALUE = 0; + /** + * Main = 1; + */ + public static final int Main_VALUE = 1; + /** + * Meter = 2; + */ + public static final int Meter_VALUE = 2; + + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Variety valueOf(int value) { + return forNumber(value); + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + */ + public static Variety forNumber(int value) { + switch (value) { + case 0: return Note; + case 1: return Main; + case 2: return Meter; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + Variety> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Variety findValueByNumber(int number) { + return Variety.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return net.taehui.EventClass.Event.NetDrawing.getDescriptor().getEnumTypes().get(0); + } + + private static final Variety[] VALUES = values(); + + public static Variety valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Variety(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:Event.NetDrawing.Variety) + } + + public static final int DRAWINGVARIETY_FIELD_NUMBER = 1; + private int drawingVariety_ = 0; + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @return The enum numeric value on the wire for drawingVariety. + */ + @java.lang.Override public int getDrawingVarietyValue() { + return drawingVariety_; + } + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @return The drawingVariety. + */ + @java.lang.Override public net.taehui.EventClass.Event.NetDrawing.Variety getDrawingVariety() { + net.taehui.EventClass.Event.NetDrawing.Variety result = net.taehui.EventClass.Event.NetDrawing.Variety.forNumber(drawingVariety_); + return result == null ? net.taehui.EventClass.Event.NetDrawing.Variety.UNRECOGNIZED : result; + } + + public static final int PARAM_FIELD_NUMBER = 2; + private int param_ = 0; + /** + * uint32 param = 2; + * @return The param. + */ + @java.lang.Override + public int getParam() { + return param_; + } + + public static final int POSITION0_FIELD_NUMBER = 3; + private double position0_ = 0D; + /** + * double position0 = 3; + * @return The position0. + */ + @java.lang.Override + public double getPosition0() { + return position0_; + } + + public static final int POSITION1_FIELD_NUMBER = 4; + private double position1_ = 0D; + /** + * double position1 = 4; + * @return The position1. + */ + @java.lang.Override + public double getPosition1() { + return position1_; + } + + public static final int LENGTH_FIELD_NUMBER = 5; + private double length_ = 0D; + /** + * double length = 5; + * @return The length. + */ + @java.lang.Override + public double getLength() { + return length_; + } + + public static final int HEIGHT_FIELD_NUMBER = 6; + private double height_ = 0D; + /** + * double height = 6; + * @return The height. + */ + @java.lang.Override + public double getHeight() { + return height_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (drawingVariety_ != net.taehui.EventClass.Event.NetDrawing.Variety.Note.getNumber()) { + output.writeEnum(1, drawingVariety_); + } + if (param_ != 0) { + output.writeUInt32(2, param_); + } + if (java.lang.Double.doubleToRawLongBits(position0_) != 0) { + output.writeDouble(3, position0_); + } + if (java.lang.Double.doubleToRawLongBits(position1_) != 0) { + output.writeDouble(4, position1_); + } + if (java.lang.Double.doubleToRawLongBits(length_) != 0) { + output.writeDouble(5, length_); + } + if (java.lang.Double.doubleToRawLongBits(height_) != 0) { + output.writeDouble(6, height_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (drawingVariety_ != net.taehui.EventClass.Event.NetDrawing.Variety.Note.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, drawingVariety_); + } + if (param_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeUInt32Size(2, param_); + } + if (java.lang.Double.doubleToRawLongBits(position0_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, position0_); + } + if (java.lang.Double.doubleToRawLongBits(position1_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, position1_); + } + if (java.lang.Double.doubleToRawLongBits(length_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(5, length_); + } + if (java.lang.Double.doubleToRawLongBits(height_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, height_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.NetDrawing)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.NetDrawing other = (net.taehui.EventClass.Event.NetDrawing) obj; + + if (drawingVariety_ != other.drawingVariety_) return false; + if (getParam() + != other.getParam()) return false; + if (java.lang.Double.doubleToLongBits(getPosition0()) + != java.lang.Double.doubleToLongBits( + other.getPosition0())) return false; + if (java.lang.Double.doubleToLongBits(getPosition1()) + != java.lang.Double.doubleToLongBits( + other.getPosition1())) return false; + if (java.lang.Double.doubleToLongBits(getLength()) + != java.lang.Double.doubleToLongBits( + other.getLength())) return false; + if (java.lang.Double.doubleToLongBits(getHeight()) + != java.lang.Double.doubleToLongBits( + other.getHeight())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DRAWINGVARIETY_FIELD_NUMBER; + hash = (53 * hash) + drawingVariety_; + hash = (37 * hash) + PARAM_FIELD_NUMBER; + hash = (53 * hash) + getParam(); + hash = (37 * hash) + POSITION0_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPosition0())); + hash = (37 * hash) + POSITION1_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getPosition1())); + hash = (37 * hash) + LENGTH_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLength())); + hash = (37 * hash) + HEIGHT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHeight())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.NetDrawing parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.NetDrawing parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.NetDrawing parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.NetDrawing parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.NetDrawing prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.NetDrawing} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.NetDrawing) + net.taehui.EventClass.Event.NetDrawingOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_NetDrawing_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_NetDrawing_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.NetDrawing.class, net.taehui.EventClass.Event.NetDrawing.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.NetDrawing.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + drawingVariety_ = 0; + param_ = 0; + position0_ = 0D; + position1_ = 0D; + length_ = 0D; + height_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_NetDrawing_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawing getDefaultInstanceForType() { + return net.taehui.EventClass.Event.NetDrawing.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawing build() { + net.taehui.EventClass.Event.NetDrawing result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawing buildPartial() { + net.taehui.EventClass.Event.NetDrawing result = new net.taehui.EventClass.Event.NetDrawing(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.NetDrawing result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.drawingVariety_ = drawingVariety_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.param_ = param_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.position0_ = position0_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.position1_ = position1_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.length_ = length_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.height_ = height_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.NetDrawing) { + return mergeFrom((net.taehui.EventClass.Event.NetDrawing)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.NetDrawing other) { + if (other == net.taehui.EventClass.Event.NetDrawing.getDefaultInstance()) return this; + if (other.drawingVariety_ != 0) { + setDrawingVarietyValue(other.getDrawingVarietyValue()); + } + if (other.getParam() != 0) { + setParam(other.getParam()); + } + if (other.getPosition0() != 0D) { + setPosition0(other.getPosition0()); + } + if (other.getPosition1() != 0D) { + setPosition1(other.getPosition1()); + } + if (other.getLength() != 0D) { + setLength(other.getLength()); + } + if (other.getHeight() != 0D) { + setHeight(other.getHeight()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + drawingVariety_ = input.readEnum(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + param_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 25: { + position0_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 33: { + position1_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 41: { + length_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + case 49: { + height_ = input.readDouble(); + bitField0_ |= 0x00000020; + break; + } // case 49 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private int drawingVariety_ = 0; + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @return The enum numeric value on the wire for drawingVariety. + */ + @java.lang.Override public int getDrawingVarietyValue() { + return drawingVariety_; + } + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @param value The enum numeric value on the wire for drawingVariety to set. + * @return This builder for chaining. + */ + public Builder setDrawingVarietyValue(int value) { + drawingVariety_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @return The drawingVariety. + */ + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawing.Variety getDrawingVariety() { + net.taehui.EventClass.Event.NetDrawing.Variety result = net.taehui.EventClass.Event.NetDrawing.Variety.forNumber(drawingVariety_); + return result == null ? net.taehui.EventClass.Event.NetDrawing.Variety.UNRECOGNIZED : result; + } + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @param value The drawingVariety to set. + * @return This builder for chaining. + */ + public Builder setDrawingVariety(net.taehui.EventClass.Event.NetDrawing.Variety value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + drawingVariety_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .Event.NetDrawing.Variety drawingVariety = 1; + * @return This builder for chaining. + */ + public Builder clearDrawingVariety() { + bitField0_ = (bitField0_ & ~0x00000001); + drawingVariety_ = 0; + onChanged(); + return this; + } + + private int param_ ; + /** + * uint32 param = 2; + * @return The param. + */ + @java.lang.Override + public int getParam() { + return param_; + } + /** + * uint32 param = 2; + * @param value The param to set. + * @return This builder for chaining. + */ + public Builder setParam(int value) { + + param_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * uint32 param = 2; + * @return This builder for chaining. + */ + public Builder clearParam() { + bitField0_ = (bitField0_ & ~0x00000002); + param_ = 0; + onChanged(); + return this; + } + + private double position0_ ; + /** + * double position0 = 3; + * @return The position0. + */ + @java.lang.Override + public double getPosition0() { + return position0_; + } + /** + * double position0 = 3; + * @param value The position0 to set. + * @return This builder for chaining. + */ + public Builder setPosition0(double value) { + + position0_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * double position0 = 3; + * @return This builder for chaining. + */ + public Builder clearPosition0() { + bitField0_ = (bitField0_ & ~0x00000004); + position0_ = 0D; + onChanged(); + return this; + } + + private double position1_ ; + /** + * double position1 = 4; + * @return The position1. + */ + @java.lang.Override + public double getPosition1() { + return position1_; + } + /** + * double position1 = 4; + * @param value The position1 to set. + * @return This builder for chaining. + */ + public Builder setPosition1(double value) { + + position1_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * double position1 = 4; + * @return This builder for chaining. + */ + public Builder clearPosition1() { + bitField0_ = (bitField0_ & ~0x00000008); + position1_ = 0D; + onChanged(); + return this; + } + + private double length_ ; + /** + * double length = 5; + * @return The length. + */ + @java.lang.Override + public double getLength() { + return length_; + } + /** + * double length = 5; + * @param value The length to set. + * @return This builder for chaining. + */ + public Builder setLength(double value) { + + length_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * double length = 5; + * @return This builder for chaining. + */ + public Builder clearLength() { + bitField0_ = (bitField0_ & ~0x00000010); + length_ = 0D; + onChanged(); + return this; + } + + private double height_ ; + /** + * double height = 6; + * @return The height. + */ + @java.lang.Override + public double getHeight() { + return height_; + } + /** + * double height = 6; + * @param value The height to set. + * @return This builder for chaining. + */ + public Builder setHeight(double value) { + + height_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * double height = 6; + * @return This builder for chaining. + */ + public Builder clearHeight() { + bitField0_ = (bitField0_ & ~0x00000020); + height_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.NetDrawing) + } + + // @@protoc_insertion_point(class_scope:Event.NetDrawing) + private static final net.taehui.EventClass.Event.NetDrawing DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.NetDrawing(); + } + + public static net.taehui.EventClass.Event.NetDrawing getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public NetDrawing parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.NetDrawing getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface DrawingComponentOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.DrawingComponent) + com.google.protobuf.MessageOrBuilder { + + /** + * float p2BuiltLength = 1; + * @return The p2BuiltLength. + */ + float getP2BuiltLength(); + + /** + * float judgmentMainPosition = 2; + * @return The judgmentMainPosition. + */ + float getJudgmentMainPosition(); + } + /** + * Protobuf type {@code Event.DrawingComponent} + */ + public static final class DrawingComponent extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.DrawingComponent) + DrawingComponentOrBuilder { + private static final long serialVersionUID = 0L; + // Use DrawingComponent.newBuilder() to construct. + private DrawingComponent(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private DrawingComponent() { + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new DrawingComponent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_DrawingComponent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_DrawingComponent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.DrawingComponent.class, net.taehui.EventClass.Event.DrawingComponent.Builder.class); + } + + public static final int P2BUILTLENGTH_FIELD_NUMBER = 1; + private float p2BuiltLength_ = 0F; + /** + * float p2BuiltLength = 1; + * @return The p2BuiltLength. + */ + @java.lang.Override + public float getP2BuiltLength() { + return p2BuiltLength_; + } + + public static final int JUDGMENTMAINPOSITION_FIELD_NUMBER = 2; + private float judgmentMainPosition_ = 0F; + /** + * float judgmentMainPosition = 2; + * @return The judgmentMainPosition. + */ + @java.lang.Override + public float getJudgmentMainPosition() { + return judgmentMainPosition_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (java.lang.Float.floatToRawIntBits(p2BuiltLength_) != 0) { + output.writeFloat(1, p2BuiltLength_); + } + if (java.lang.Float.floatToRawIntBits(judgmentMainPosition_) != 0) { + output.writeFloat(2, judgmentMainPosition_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (java.lang.Float.floatToRawIntBits(p2BuiltLength_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(1, p2BuiltLength_); + } + if (java.lang.Float.floatToRawIntBits(judgmentMainPosition_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeFloatSize(2, judgmentMainPosition_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.DrawingComponent)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.DrawingComponent other = (net.taehui.EventClass.Event.DrawingComponent) obj; + + if (java.lang.Float.floatToIntBits(getP2BuiltLength()) + != java.lang.Float.floatToIntBits( + other.getP2BuiltLength())) return false; + if (java.lang.Float.floatToIntBits(getJudgmentMainPosition()) + != java.lang.Float.floatToIntBits( + other.getJudgmentMainPosition())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + P2BUILTLENGTH_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getP2BuiltLength()); + hash = (37 * hash) + JUDGMENTMAINPOSITION_FIELD_NUMBER; + hash = (53 * hash) + java.lang.Float.floatToIntBits( + getJudgmentMainPosition()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.DrawingComponent parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.DrawingComponent parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.DrawingComponent parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.DrawingComponent parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.DrawingComponent prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.DrawingComponent} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.DrawingComponent) + net.taehui.EventClass.Event.DrawingComponentOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_DrawingComponent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_DrawingComponent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.DrawingComponent.class, net.taehui.EventClass.Event.DrawingComponent.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.DrawingComponent.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + p2BuiltLength_ = 0F; + judgmentMainPosition_ = 0F; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_DrawingComponent_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.DrawingComponent getDefaultInstanceForType() { + return net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.DrawingComponent build() { + net.taehui.EventClass.Event.DrawingComponent result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.DrawingComponent buildPartial() { + net.taehui.EventClass.Event.DrawingComponent result = new net.taehui.EventClass.Event.DrawingComponent(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.DrawingComponent result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.p2BuiltLength_ = p2BuiltLength_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.judgmentMainPosition_ = judgmentMainPosition_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.DrawingComponent) { + return mergeFrom((net.taehui.EventClass.Event.DrawingComponent)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.DrawingComponent other) { + if (other == net.taehui.EventClass.Event.DrawingComponent.getDefaultInstance()) return this; + if (other.getP2BuiltLength() != 0F) { + setP2BuiltLength(other.getP2BuiltLength()); + } + if (other.getJudgmentMainPosition() != 0F) { + setJudgmentMainPosition(other.getJudgmentMainPosition()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: { + p2BuiltLength_ = input.readFloat(); + bitField0_ |= 0x00000001; + break; + } // case 13 + case 21: { + judgmentMainPosition_ = input.readFloat(); + bitField0_ |= 0x00000002; + break; + } // case 21 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private float p2BuiltLength_ ; + /** + * float p2BuiltLength = 1; + * @return The p2BuiltLength. + */ + @java.lang.Override + public float getP2BuiltLength() { + return p2BuiltLength_; + } + /** + * float p2BuiltLength = 1; + * @param value The p2BuiltLength to set. + * @return This builder for chaining. + */ + public Builder setP2BuiltLength(float value) { + + p2BuiltLength_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * float p2BuiltLength = 1; + * @return This builder for chaining. + */ + public Builder clearP2BuiltLength() { + bitField0_ = (bitField0_ & ~0x00000001); + p2BuiltLength_ = 0F; + onChanged(); + return this; + } + + private float judgmentMainPosition_ ; + /** + * float judgmentMainPosition = 2; + * @return The judgmentMainPosition. + */ + @java.lang.Override + public float getJudgmentMainPosition() { + return judgmentMainPosition_; + } + /** + * float judgmentMainPosition = 2; + * @param value The judgmentMainPosition to set. + * @return This builder for chaining. + */ + public Builder setJudgmentMainPosition(float value) { + + judgmentMainPosition_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * float judgmentMainPosition = 2; + * @return This builder for chaining. + */ + public Builder clearJudgmentMainPosition() { + bitField0_ = (bitField0_ & ~0x00000002); + judgmentMainPosition_ = 0F; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.DrawingComponent) + } + + // @@protoc_insertion_point(class_scope:Event.DrawingComponent) + private static final net.taehui.EventClass.Event.DrawingComponent DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.DrawingComponent(); + } + + public static net.taehui.EventClass.Event.DrawingComponent getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DrawingComponent parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.DrawingComponent getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QwilightIOInputOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.QwilightIOInput) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + java.util.List + getAvatarIDsList(); + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + int getAvatarIDsCount(); + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + java.lang.String getAvatarIDs(int index); + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + com.google.protobuf.ByteString + getAvatarIDsBytes(int index); + + /** + * string handlerID = 2; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 input = 3; + * @return The input. + */ + int getInput(); + + /** + * int32 power = 4; + * @return The power. + */ + int getPower(); + } + /** + * Protobuf type {@code Event.QwilightIOInput} + */ + public static final class QwilightIOInput extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.QwilightIOInput) + QwilightIOInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use QwilightIOInput.newBuilder() to construct. + private QwilightIOInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QwilightIOInput() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QwilightIOInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOInput.class, net.taehui.EventClass.Event.QwilightIOInput.Builder.class); + } + + public static final int AVATARIDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + + public static final int HANDLERID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_FIELD_NUMBER = 3; + private int input_ = 0; + /** + * int32 input = 3; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + + public static final int POWER_FIELD_NUMBER = 4; + private int power_ = 0; + /** + * int32 power = 4; + * @return The power. + */ + @java.lang.Override + public int getPower() { + return power_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < avatarIDs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, avatarIDs_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handlerID_); + } + if (input_ != 0) { + output.writeInt32(3, input_); + } + if (power_ != 0) { + output.writeInt32(4, power_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < avatarIDs_.size(); i++) { + dataSize += computeStringSizeNoTag(avatarIDs_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvatarIDsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handlerID_); + } + if (input_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, input_); + } + if (power_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, power_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.QwilightIOInput)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.QwilightIOInput other = (net.taehui.EventClass.Event.QwilightIOInput) obj; + + if (!getAvatarIDsList() + .equals(other.getAvatarIDsList())) return false; + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getInput() + != other.getInput()) return false; + if (getPower() + != other.getPower()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAvatarIDsCount() > 0) { + hash = (37 * hash) + AVATARIDS_FIELD_NUMBER; + hash = (53 * hash) + getAvatarIDsList().hashCode(); + } + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput(); + hash = (37 * hash) + POWER_FIELD_NUMBER; + hash = (53 * hash) + getPower(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.QwilightIOInput parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.QwilightIOInput parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOInput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.QwilightIOInput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.QwilightIOInput} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.QwilightIOInput) + net.taehui.EventClass.Event.QwilightIOInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOInput.class, net.taehui.EventClass.Event.QwilightIOInput.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.QwilightIOInput.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + input_ = 0; + power_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_QwilightIOInput_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOInput getDefaultInstanceForType() { + return net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOInput build() { + net.taehui.EventClass.Event.QwilightIOInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOInput buildPartial() { + net.taehui.EventClass.Event.QwilightIOInput result = new net.taehui.EventClass.Event.QwilightIOInput(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.QwilightIOInput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + avatarIDs_.makeImmutable(); + result.avatarIDs_ = avatarIDs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.input_ = input_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.power_ = power_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.QwilightIOInput) { + return mergeFrom((net.taehui.EventClass.Event.QwilightIOInput)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.QwilightIOInput other) { + if (other == net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance()) return this; + if (!other.avatarIDs_.isEmpty()) { + if (avatarIDs_.isEmpty()) { + avatarIDs_ = other.avatarIDs_; + bitField0_ |= 0x00000001; + } else { + ensureAvatarIDsIsMutable(); + avatarIDs_.addAll(other.avatarIDs_); + } + onChanged(); + } + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getInput() != 0) { + setInput(other.getInput()); + } + if (other.getPower() != 0) { + setPower(other.getPower()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(s); + break; + } // case 10 + case 18: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + input_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + power_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAvatarIDsIsMutable() { + if (!avatarIDs_.isModifiable()) { + avatarIDs_ = new com.google.protobuf.LazyStringArrayList(avatarIDs_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + avatarIDs_.makeImmutable(); + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index to set the value at. + * @param value The avatarIDs to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param values The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAllAvatarIDs( + java.lang.Iterable values) { + ensureAvatarIDsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, avatarIDs_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @return This builder for chaining. + */ + public Builder clearAvatarIDs() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The bytes of the avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 2; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int input_ ; + /** + * int32 input = 3; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + /** + * int32 input = 3; + * @param value The input to set. + * @return This builder for chaining. + */ + public Builder setInput(int value) { + + input_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 input = 3; + * @return This builder for chaining. + */ + public Builder clearInput() { + bitField0_ = (bitField0_ & ~0x00000004); + input_ = 0; + onChanged(); + return this; + } + + private int power_ ; + /** + * int32 power = 4; + * @return The power. + */ + @java.lang.Override + public int getPower() { + return power_; + } + /** + * int32 power = 4; + * @param value The power to set. + * @return This builder for chaining. + */ + public Builder setPower(int value) { + + power_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 power = 4; + * @return This builder for chaining. + */ + public Builder clearPower() { + bitField0_ = (bitField0_ & ~0x00000008); + power_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.QwilightIOInput) + } + + // @@protoc_insertion_point(class_scope:Event.QwilightIOInput) + private static final net.taehui.EventClass.Event.QwilightIOInput DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.QwilightIOInput(); + } + + public static net.taehui.EventClass.Event.QwilightIOInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QwilightIOInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TwilightIOInputOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightIOInput) + com.google.protobuf.MessageOrBuilder { + + /** + * string handlerID = 1; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 input = 2; + * @return The input. + */ + int getInput(); + + /** + * int32 power = 3; + * @return The power. + */ + int getPower(); + } + /** + * Protobuf type {@code Event.TwilightIOInput} + */ + public static final class TwilightIOInput extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightIOInput) + TwilightIOInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightIOInput.newBuilder() to construct. + private TwilightIOInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightIOInput() { + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightIOInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOInput.class, net.taehui.EventClass.Event.TwilightIOInput.Builder.class); + } + + public static final int HANDLERID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_FIELD_NUMBER = 2; + private int input_ = 0; + /** + * int32 input = 2; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + + public static final int POWER_FIELD_NUMBER = 3; + private int power_ = 0; + /** + * int32 power = 3; + * @return The power. + */ + @java.lang.Override + public int getPower() { + return power_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, handlerID_); + } + if (input_ != 0) { + output.writeInt32(2, input_); + } + if (power_ != 0) { + output.writeInt32(3, power_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, handlerID_); + } + if (input_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, input_); + } + if (power_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, power_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightIOInput)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightIOInput other = (net.taehui.EventClass.Event.TwilightIOInput) obj; + + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getInput() + != other.getInput()) return false; + if (getPower() + != other.getPower()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput(); + hash = (37 * hash) + POWER_FIELD_NUMBER; + hash = (53 * hash) + getPower(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightIOInput parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightIOInput parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOInput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightIOInput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightIOInput} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightIOInput) + net.taehui.EventClass.Event.TwilightIOInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOInput.class, net.taehui.EventClass.Event.TwilightIOInput.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightIOInput.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + handlerID_ = ""; + input_ = 0; + power_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightIOInput_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOInput getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOInput build() { + net.taehui.EventClass.Event.TwilightIOInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOInput buildPartial() { + net.taehui.EventClass.Event.TwilightIOInput result = new net.taehui.EventClass.Event.TwilightIOInput(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightIOInput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.input_ = input_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.power_ = power_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightIOInput) { + return mergeFrom((net.taehui.EventClass.Event.TwilightIOInput)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightIOInput other) { + if (other == net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance()) return this; + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getInput() != 0) { + setInput(other.getInput()); + } + if (other.getPower() != 0) { + setPower(other.getPower()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + input_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + power_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 1; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int input_ ; + /** + * int32 input = 2; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + /** + * int32 input = 2; + * @param value The input to set. + * @return This builder for chaining. + */ + public Builder setInput(int value) { + + input_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 input = 2; + * @return This builder for chaining. + */ + public Builder clearInput() { + bitField0_ = (bitField0_ & ~0x00000002); + input_ = 0; + onChanged(); + return this; + } + + private int power_ ; + /** + * int32 power = 3; + * @return The power. + */ + @java.lang.Override + public int getPower() { + return power_; + } + /** + * int32 power = 3; + * @param value The power to set. + * @return This builder for chaining. + */ + public Builder setPower(int value) { + + power_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 power = 3; + * @return This builder for chaining. + */ + public Builder clearPower() { + bitField0_ = (bitField0_ & ~0x00000004); + power_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightIOInput) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightIOInput) + private static final net.taehui.EventClass.Event.TwilightIOInput DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightIOInput(); + } + + public static net.taehui.EventClass.Event.TwilightIOInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightIOInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QwilightIOJudgeOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.QwilightIOJudge) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + java.util.List + getAvatarIDsList(); + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + int getAvatarIDsCount(); + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + java.lang.String getAvatarIDs(int index); + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + com.google.protobuf.ByteString + getAvatarIDsBytes(int index); + + /** + * string handlerID = 2; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 noteID = 3; + * @return The noteID. + */ + int getNoteID(); + + /** + * int32 judged = 4; + * @return The judged. + */ + int getJudged(); + } + /** + * Protobuf type {@code Event.QwilightIOJudge} + */ + public static final class QwilightIOJudge extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.QwilightIOJudge) + QwilightIOJudgeOrBuilder { + private static final long serialVersionUID = 0L; + // Use QwilightIOJudge.newBuilder() to construct. + private QwilightIOJudge(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QwilightIOJudge() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QwilightIOJudge(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOJudge.class, net.taehui.EventClass.Event.QwilightIOJudge.Builder.class); + } + + public static final int AVATARIDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + + public static final int HANDLERID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEID_FIELD_NUMBER = 3; + private int noteID_ = 0; + /** + * int32 noteID = 3; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + + public static final int JUDGED_FIELD_NUMBER = 4; + private int judged_ = 0; + /** + * int32 judged = 4; + * @return The judged. + */ + @java.lang.Override + public int getJudged() { + return judged_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < avatarIDs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, avatarIDs_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handlerID_); + } + if (noteID_ != 0) { + output.writeInt32(3, noteID_); + } + if (judged_ != 0) { + output.writeInt32(4, judged_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < avatarIDs_.size(); i++) { + dataSize += computeStringSizeNoTag(avatarIDs_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvatarIDsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handlerID_); + } + if (noteID_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, noteID_); + } + if (judged_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, judged_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.QwilightIOJudge)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.QwilightIOJudge other = (net.taehui.EventClass.Event.QwilightIOJudge) obj; + + if (!getAvatarIDsList() + .equals(other.getAvatarIDsList())) return false; + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getNoteID() + != other.getNoteID()) return false; + if (getJudged() + != other.getJudged()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAvatarIDsCount() > 0) { + hash = (37 * hash) + AVATARIDS_FIELD_NUMBER; + hash = (53 * hash) + getAvatarIDsList().hashCode(); + } + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + NOTEID_FIELD_NUMBER; + hash = (53 * hash) + getNoteID(); + hash = (37 * hash) + JUDGED_FIELD_NUMBER; + hash = (53 * hash) + getJudged(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.QwilightIOJudge parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.QwilightIOJudge parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOJudge parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.QwilightIOJudge prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.QwilightIOJudge} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.QwilightIOJudge) + net.taehui.EventClass.Event.QwilightIOJudgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOJudge.class, net.taehui.EventClass.Event.QwilightIOJudge.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.QwilightIOJudge.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + noteID_ = 0; + judged_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudge_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudge getDefaultInstanceForType() { + return net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudge build() { + net.taehui.EventClass.Event.QwilightIOJudge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudge buildPartial() { + net.taehui.EventClass.Event.QwilightIOJudge result = new net.taehui.EventClass.Event.QwilightIOJudge(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.QwilightIOJudge result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + avatarIDs_.makeImmutable(); + result.avatarIDs_ = avatarIDs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.noteID_ = noteID_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.judged_ = judged_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.QwilightIOJudge) { + return mergeFrom((net.taehui.EventClass.Event.QwilightIOJudge)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.QwilightIOJudge other) { + if (other == net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance()) return this; + if (!other.avatarIDs_.isEmpty()) { + if (avatarIDs_.isEmpty()) { + avatarIDs_ = other.avatarIDs_; + bitField0_ |= 0x00000001; + } else { + ensureAvatarIDsIsMutable(); + avatarIDs_.addAll(other.avatarIDs_); + } + onChanged(); + } + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getNoteID() != 0) { + setNoteID(other.getNoteID()); + } + if (other.getJudged() != 0) { + setJudged(other.getJudged()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(s); + break; + } // case 10 + case 18: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + noteID_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + judged_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAvatarIDsIsMutable() { + if (!avatarIDs_.isModifiable()) { + avatarIDs_ = new com.google.protobuf.LazyStringArrayList(avatarIDs_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + avatarIDs_.makeImmutable(); + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index to set the value at. + * @param value The avatarIDs to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param values The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAllAvatarIDs( + java.lang.Iterable values) { + ensureAvatarIDsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, avatarIDs_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @return This builder for chaining. + */ + public Builder clearAvatarIDs() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The bytes of the avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 2; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int noteID_ ; + /** + * int32 noteID = 3; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + /** + * int32 noteID = 3; + * @param value The noteID to set. + * @return This builder for chaining. + */ + public Builder setNoteID(int value) { + + noteID_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 noteID = 3; + * @return This builder for chaining. + */ + public Builder clearNoteID() { + bitField0_ = (bitField0_ & ~0x00000004); + noteID_ = 0; + onChanged(); + return this; + } + + private int judged_ ; + /** + * int32 judged = 4; + * @return The judged. + */ + @java.lang.Override + public int getJudged() { + return judged_; + } + /** + * int32 judged = 4; + * @param value The judged to set. + * @return This builder for chaining. + */ + public Builder setJudged(int value) { + + judged_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 judged = 4; + * @return This builder for chaining. + */ + public Builder clearJudged() { + bitField0_ = (bitField0_ & ~0x00000008); + judged_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.QwilightIOJudge) + } + + // @@protoc_insertion_point(class_scope:Event.QwilightIOJudge) + private static final net.taehui.EventClass.Event.QwilightIOJudge DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.QwilightIOJudge(); + } + + public static net.taehui.EventClass.Event.QwilightIOJudge getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QwilightIOJudge parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudge getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TwilightIOJudgeOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightIOJudge) + com.google.protobuf.MessageOrBuilder { + + /** + * string handlerID = 1; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 noteID = 2; + * @return The noteID. + */ + int getNoteID(); + + /** + * int32 judged = 3; + * @return The judged. + */ + int getJudged(); + } + /** + * Protobuf type {@code Event.TwilightIOJudge} + */ + public static final class TwilightIOJudge extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightIOJudge) + TwilightIOJudgeOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightIOJudge.newBuilder() to construct. + private TwilightIOJudge(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightIOJudge() { + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightIOJudge(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOJudge.class, net.taehui.EventClass.Event.TwilightIOJudge.Builder.class); + } + + public static final int HANDLERID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEID_FIELD_NUMBER = 2; + private int noteID_ = 0; + /** + * int32 noteID = 2; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + + public static final int JUDGED_FIELD_NUMBER = 3; + private int judged_ = 0; + /** + * int32 judged = 3; + * @return The judged. + */ + @java.lang.Override + public int getJudged() { + return judged_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, handlerID_); + } + if (noteID_ != 0) { + output.writeInt32(2, noteID_); + } + if (judged_ != 0) { + output.writeInt32(3, judged_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, handlerID_); + } + if (noteID_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, noteID_); + } + if (judged_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, judged_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightIOJudge)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightIOJudge other = (net.taehui.EventClass.Event.TwilightIOJudge) obj; + + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getNoteID() + != other.getNoteID()) return false; + if (getJudged() + != other.getJudged()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + NOTEID_FIELD_NUMBER; + hash = (53 * hash) + getNoteID(); + hash = (37 * hash) + JUDGED_FIELD_NUMBER; + hash = (53 * hash) + getJudged(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightIOJudge parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightIOJudge parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOJudge parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightIOJudge prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightIOJudge} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightIOJudge) + net.taehui.EventClass.Event.TwilightIOJudgeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudge_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudge_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOJudge.class, net.taehui.EventClass.Event.TwilightIOJudge.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightIOJudge.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + handlerID_ = ""; + noteID_ = 0; + judged_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudge_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudge getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudge build() { + net.taehui.EventClass.Event.TwilightIOJudge result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudge buildPartial() { + net.taehui.EventClass.Event.TwilightIOJudge result = new net.taehui.EventClass.Event.TwilightIOJudge(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightIOJudge result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.noteID_ = noteID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.judged_ = judged_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightIOJudge) { + return mergeFrom((net.taehui.EventClass.Event.TwilightIOJudge)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightIOJudge other) { + if (other == net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance()) return this; + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getNoteID() != 0) { + setNoteID(other.getNoteID()); + } + if (other.getJudged() != 0) { + setJudged(other.getJudged()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + noteID_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + judged_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 1; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int noteID_ ; + /** + * int32 noteID = 2; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + /** + * int32 noteID = 2; + * @param value The noteID to set. + * @return This builder for chaining. + */ + public Builder setNoteID(int value) { + + noteID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 noteID = 2; + * @return This builder for chaining. + */ + public Builder clearNoteID() { + bitField0_ = (bitField0_ & ~0x00000002); + noteID_ = 0; + onChanged(); + return this; + } + + private int judged_ ; + /** + * int32 judged = 3; + * @return The judged. + */ + @java.lang.Override + public int getJudged() { + return judged_; + } + /** + * int32 judged = 3; + * @param value The judged to set. + * @return This builder for chaining. + */ + public Builder setJudged(int value) { + + judged_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 judged = 3; + * @return This builder for chaining. + */ + public Builder clearJudged() { + bitField0_ = (bitField0_ & ~0x00000004); + judged_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightIOJudge) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightIOJudge) + private static final net.taehui.EventClass.Event.TwilightIOJudge DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightIOJudge(); + } + + public static net.taehui.EventClass.Event.TwilightIOJudge getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightIOJudge parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudge getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QwilightIOJudgmentMeterOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.QwilightIOJudgmentMeter) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + java.util.List + getAvatarIDsList(); + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + int getAvatarIDsCount(); + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + java.lang.String getAvatarIDs(int index); + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + com.google.protobuf.ByteString + getAvatarIDsBytes(int index); + + /** + * string handlerID = 2; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 input = 3; + * @return The input. + */ + int getInput(); + + /** + * double judgmentMeter = 4; + * @return The judgmentMeter. + */ + double getJudgmentMeter(); + + /** + * int32 assist = 5; + * @return The assist. + */ + int getAssist(); + } + /** + * Protobuf type {@code Event.QwilightIOJudgmentMeter} + */ + public static final class QwilightIOJudgmentMeter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.QwilightIOJudgmentMeter) + QwilightIOJudgmentMeterOrBuilder { + private static final long serialVersionUID = 0L; + // Use QwilightIOJudgmentMeter.newBuilder() to construct. + private QwilightIOJudgmentMeter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QwilightIOJudgmentMeter() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QwilightIOJudgmentMeter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudgmentMeter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudgmentMeter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOJudgmentMeter.class, net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder.class); + } + + public static final int AVATARIDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + + public static final int HANDLERID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_FIELD_NUMBER = 3; + private int input_ = 0; + /** + * int32 input = 3; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + + public static final int JUDGMENTMETER_FIELD_NUMBER = 4; + private double judgmentMeter_ = 0D; + /** + * double judgmentMeter = 4; + * @return The judgmentMeter. + */ + @java.lang.Override + public double getJudgmentMeter() { + return judgmentMeter_; + } + + public static final int ASSIST_FIELD_NUMBER = 5; + private int assist_ = 0; + /** + * int32 assist = 5; + * @return The assist. + */ + @java.lang.Override + public int getAssist() { + return assist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < avatarIDs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, avatarIDs_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handlerID_); + } + if (input_ != 0) { + output.writeInt32(3, input_); + } + if (java.lang.Double.doubleToRawLongBits(judgmentMeter_) != 0) { + output.writeDouble(4, judgmentMeter_); + } + if (assist_ != 0) { + output.writeInt32(5, assist_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < avatarIDs_.size(); i++) { + dataSize += computeStringSizeNoTag(avatarIDs_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvatarIDsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handlerID_); + } + if (input_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, input_); + } + if (java.lang.Double.doubleToRawLongBits(judgmentMeter_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, judgmentMeter_); + } + if (assist_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, assist_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.QwilightIOJudgmentMeter)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.QwilightIOJudgmentMeter other = (net.taehui.EventClass.Event.QwilightIOJudgmentMeter) obj; + + if (!getAvatarIDsList() + .equals(other.getAvatarIDsList())) return false; + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getInput() + != other.getInput()) return false; + if (java.lang.Double.doubleToLongBits(getJudgmentMeter()) + != java.lang.Double.doubleToLongBits( + other.getJudgmentMeter())) return false; + if (getAssist() + != other.getAssist()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAvatarIDsCount() > 0) { + hash = (37 * hash) + AVATARIDS_FIELD_NUMBER; + hash = (53 * hash) + getAvatarIDsList().hashCode(); + } + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput(); + hash = (37 * hash) + JUDGMENTMETER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getJudgmentMeter())); + hash = (37 * hash) + ASSIST_FIELD_NUMBER; + hash = (53 * hash) + getAssist(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.QwilightIOJudgmentMeter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.QwilightIOJudgmentMeter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.QwilightIOJudgmentMeter) + net.taehui.EventClass.Event.QwilightIOJudgmentMeterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudgmentMeter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudgmentMeter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOJudgmentMeter.class, net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.QwilightIOJudgmentMeter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + input_ = 0; + judgmentMeter_ = 0D; + assist_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_QwilightIOJudgmentMeter_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgmentMeter getDefaultInstanceForType() { + return net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgmentMeter build() { + net.taehui.EventClass.Event.QwilightIOJudgmentMeter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgmentMeter buildPartial() { + net.taehui.EventClass.Event.QwilightIOJudgmentMeter result = new net.taehui.EventClass.Event.QwilightIOJudgmentMeter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.QwilightIOJudgmentMeter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + avatarIDs_.makeImmutable(); + result.avatarIDs_ = avatarIDs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.input_ = input_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.judgmentMeter_ = judgmentMeter_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.assist_ = assist_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.QwilightIOJudgmentMeter) { + return mergeFrom((net.taehui.EventClass.Event.QwilightIOJudgmentMeter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.QwilightIOJudgmentMeter other) { + if (other == net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance()) return this; + if (!other.avatarIDs_.isEmpty()) { + if (avatarIDs_.isEmpty()) { + avatarIDs_ = other.avatarIDs_; + bitField0_ |= 0x00000001; + } else { + ensureAvatarIDsIsMutable(); + avatarIDs_.addAll(other.avatarIDs_); + } + onChanged(); + } + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getInput() != 0) { + setInput(other.getInput()); + } + if (other.getJudgmentMeter() != 0D) { + setJudgmentMeter(other.getJudgmentMeter()); + } + if (other.getAssist() != 0) { + setAssist(other.getAssist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(s); + break; + } // case 10 + case 18: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + input_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 33: { + judgmentMeter_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + case 40: { + assist_ = input.readInt32(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAvatarIDsIsMutable() { + if (!avatarIDs_.isModifiable()) { + avatarIDs_ = new com.google.protobuf.LazyStringArrayList(avatarIDs_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + avatarIDs_.makeImmutable(); + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index to set the value at. + * @param value The avatarIDs to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param values The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAllAvatarIDs( + java.lang.Iterable values) { + ensureAvatarIDsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, avatarIDs_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @return This builder for chaining. + */ + public Builder clearAvatarIDs() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The bytes of the avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 2; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int input_ ; + /** + * int32 input = 3; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + /** + * int32 input = 3; + * @param value The input to set. + * @return This builder for chaining. + */ + public Builder setInput(int value) { + + input_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 input = 3; + * @return This builder for chaining. + */ + public Builder clearInput() { + bitField0_ = (bitField0_ & ~0x00000004); + input_ = 0; + onChanged(); + return this; + } + + private double judgmentMeter_ ; + /** + * double judgmentMeter = 4; + * @return The judgmentMeter. + */ + @java.lang.Override + public double getJudgmentMeter() { + return judgmentMeter_; + } + /** + * double judgmentMeter = 4; + * @param value The judgmentMeter to set. + * @return This builder for chaining. + */ + public Builder setJudgmentMeter(double value) { + + judgmentMeter_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * double judgmentMeter = 4; + * @return This builder for chaining. + */ + public Builder clearJudgmentMeter() { + bitField0_ = (bitField0_ & ~0x00000008); + judgmentMeter_ = 0D; + onChanged(); + return this; + } + + private int assist_ ; + /** + * int32 assist = 5; + * @return The assist. + */ + @java.lang.Override + public int getAssist() { + return assist_; + } + /** + * int32 assist = 5; + * @param value The assist to set. + * @return This builder for chaining. + */ + public Builder setAssist(int value) { + + assist_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * int32 assist = 5; + * @return This builder for chaining. + */ + public Builder clearAssist() { + bitField0_ = (bitField0_ & ~0x00000010); + assist_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.QwilightIOJudgmentMeter) + } + + // @@protoc_insertion_point(class_scope:Event.QwilightIOJudgmentMeter) + private static final net.taehui.EventClass.Event.QwilightIOJudgmentMeter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.QwilightIOJudgmentMeter(); + } + + public static net.taehui.EventClass.Event.QwilightIOJudgmentMeter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QwilightIOJudgmentMeter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgmentMeter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TwilightIOJudgmentMeterOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightIOJudgmentMeter) + com.google.protobuf.MessageOrBuilder { + + /** + * string handlerID = 1; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 input = 2; + * @return The input. + */ + int getInput(); + + /** + * double judgmentMeter = 3; + * @return The judgmentMeter. + */ + double getJudgmentMeter(); + + /** + * int32 assist = 4; + * @return The assist. + */ + int getAssist(); + } + /** + * Protobuf type {@code Event.TwilightIOJudgmentMeter} + */ + public static final class TwilightIOJudgmentMeter extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightIOJudgmentMeter) + TwilightIOJudgmentMeterOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightIOJudgmentMeter.newBuilder() to construct. + private TwilightIOJudgmentMeter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightIOJudgmentMeter() { + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightIOJudgmentMeter(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudgmentMeter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudgmentMeter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOJudgmentMeter.class, net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder.class); + } + + public static final int HANDLERID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int INPUT_FIELD_NUMBER = 2; + private int input_ = 0; + /** + * int32 input = 2; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + + public static final int JUDGMENTMETER_FIELD_NUMBER = 3; + private double judgmentMeter_ = 0D; + /** + * double judgmentMeter = 3; + * @return The judgmentMeter. + */ + @java.lang.Override + public double getJudgmentMeter() { + return judgmentMeter_; + } + + public static final int ASSIST_FIELD_NUMBER = 4; + private int assist_ = 0; + /** + * int32 assist = 4; + * @return The assist. + */ + @java.lang.Override + public int getAssist() { + return assist_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, handlerID_); + } + if (input_ != 0) { + output.writeInt32(2, input_); + } + if (java.lang.Double.doubleToRawLongBits(judgmentMeter_) != 0) { + output.writeDouble(3, judgmentMeter_); + } + if (assist_ != 0) { + output.writeInt32(4, assist_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, handlerID_); + } + if (input_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, input_); + } + if (java.lang.Double.doubleToRawLongBits(judgmentMeter_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, judgmentMeter_); + } + if (assist_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, assist_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightIOJudgmentMeter)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightIOJudgmentMeter other = (net.taehui.EventClass.Event.TwilightIOJudgmentMeter) obj; + + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getInput() + != other.getInput()) return false; + if (java.lang.Double.doubleToLongBits(getJudgmentMeter()) + != java.lang.Double.doubleToLongBits( + other.getJudgmentMeter())) return false; + if (getAssist() + != other.getAssist()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + INPUT_FIELD_NUMBER; + hash = (53 * hash) + getInput(); + hash = (37 * hash) + JUDGMENTMETER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getJudgmentMeter())); + hash = (37 * hash) + ASSIST_FIELD_NUMBER; + hash = (53 * hash) + getAssist(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightIOJudgmentMeter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightIOJudgmentMeter} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightIOJudgmentMeter) + net.taehui.EventClass.Event.TwilightIOJudgmentMeterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudgmentMeter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudgmentMeter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOJudgmentMeter.class, net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightIOJudgmentMeter.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + handlerID_ = ""; + input_ = 0; + judgmentMeter_ = 0D; + assist_ = 0; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightIOJudgmentMeter_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgmentMeter getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgmentMeter build() { + net.taehui.EventClass.Event.TwilightIOJudgmentMeter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgmentMeter buildPartial() { + net.taehui.EventClass.Event.TwilightIOJudgmentMeter result = new net.taehui.EventClass.Event.TwilightIOJudgmentMeter(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightIOJudgmentMeter result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.input_ = input_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.judgmentMeter_ = judgmentMeter_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.assist_ = assist_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightIOJudgmentMeter) { + return mergeFrom((net.taehui.EventClass.Event.TwilightIOJudgmentMeter)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightIOJudgmentMeter other) { + if (other == net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance()) return this; + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getInput() != 0) { + setInput(other.getInput()); + } + if (other.getJudgmentMeter() != 0D) { + setJudgmentMeter(other.getJudgmentMeter()); + } + if (other.getAssist() != 0) { + setAssist(other.getAssist()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + input_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 25: { + judgmentMeter_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + case 32: { + assist_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 1; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int input_ ; + /** + * int32 input = 2; + * @return The input. + */ + @java.lang.Override + public int getInput() { + return input_; + } + /** + * int32 input = 2; + * @param value The input to set. + * @return This builder for chaining. + */ + public Builder setInput(int value) { + + input_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 input = 2; + * @return This builder for chaining. + */ + public Builder clearInput() { + bitField0_ = (bitField0_ & ~0x00000002); + input_ = 0; + onChanged(); + return this; + } + + private double judgmentMeter_ ; + /** + * double judgmentMeter = 3; + * @return The judgmentMeter. + */ + @java.lang.Override + public double getJudgmentMeter() { + return judgmentMeter_; + } + /** + * double judgmentMeter = 3; + * @param value The judgmentMeter to set. + * @return This builder for chaining. + */ + public Builder setJudgmentMeter(double value) { + + judgmentMeter_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * double judgmentMeter = 3; + * @return This builder for chaining. + */ + public Builder clearJudgmentMeter() { + bitField0_ = (bitField0_ & ~0x00000004); + judgmentMeter_ = 0D; + onChanged(); + return this; + } + + private int assist_ ; + /** + * int32 assist = 4; + * @return The assist. + */ + @java.lang.Override + public int getAssist() { + return assist_; + } + /** + * int32 assist = 4; + * @param value The assist to set. + * @return This builder for chaining. + */ + public Builder setAssist(int value) { + + assist_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 assist = 4; + * @return This builder for chaining. + */ + public Builder clearAssist() { + bitField0_ = (bitField0_ & ~0x00000008); + assist_ = 0; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightIOJudgmentMeter) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightIOJudgmentMeter) + private static final net.taehui.EventClass.Event.TwilightIOJudgmentMeter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightIOJudgmentMeter(); + } + + public static net.taehui.EventClass.Event.TwilightIOJudgmentMeter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightIOJudgmentMeter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgmentMeter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QwilightIONoteVisibilityOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.QwilightIONoteVisibility) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + java.util.List + getAvatarIDsList(); + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + int getAvatarIDsCount(); + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + java.lang.String getAvatarIDs(int index); + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + com.google.protobuf.ByteString + getAvatarIDsBytes(int index); + + /** + * string handlerID = 2; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 noteID = 3; + * @return The noteID. + */ + int getNoteID(); + + /** + * bool setValidJudgedNotes = 4; + * @return The setValidJudgedNotes. + */ + boolean getSetValidJudgedNotes(); + + /** + * bool setNoteFailed = 5; + * @return The setNoteFailed. + */ + boolean getSetNoteFailed(); + } + /** + * Protobuf type {@code Event.QwilightIONoteVisibility} + */ + public static final class QwilightIONoteVisibility extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.QwilightIONoteVisibility) + QwilightIONoteVisibilityOrBuilder { + private static final long serialVersionUID = 0L; + // Use QwilightIONoteVisibility.newBuilder() to construct. + private QwilightIONoteVisibility(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QwilightIONoteVisibility() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QwilightIONoteVisibility(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIONoteVisibility_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIONoteVisibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIONoteVisibility.class, net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder.class); + } + + public static final int AVATARIDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + + public static final int HANDLERID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEID_FIELD_NUMBER = 3; + private int noteID_ = 0; + /** + * int32 noteID = 3; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + + public static final int SETVALIDJUDGEDNOTES_FIELD_NUMBER = 4; + private boolean setValidJudgedNotes_ = false; + /** + * bool setValidJudgedNotes = 4; + * @return The setValidJudgedNotes. + */ + @java.lang.Override + public boolean getSetValidJudgedNotes() { + return setValidJudgedNotes_; + } + + public static final int SETNOTEFAILED_FIELD_NUMBER = 5; + private boolean setNoteFailed_ = false; + /** + * bool setNoteFailed = 5; + * @return The setNoteFailed. + */ + @java.lang.Override + public boolean getSetNoteFailed() { + return setNoteFailed_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < avatarIDs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, avatarIDs_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handlerID_); + } + if (noteID_ != 0) { + output.writeInt32(3, noteID_); + } + if (setValidJudgedNotes_ != false) { + output.writeBool(4, setValidJudgedNotes_); + } + if (setNoteFailed_ != false) { + output.writeBool(5, setNoteFailed_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < avatarIDs_.size(); i++) { + dataSize += computeStringSizeNoTag(avatarIDs_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvatarIDsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handlerID_); + } + if (noteID_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, noteID_); + } + if (setValidJudgedNotes_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, setValidJudgedNotes_); + } + if (setNoteFailed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(5, setNoteFailed_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.QwilightIONoteVisibility)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.QwilightIONoteVisibility other = (net.taehui.EventClass.Event.QwilightIONoteVisibility) obj; + + if (!getAvatarIDsList() + .equals(other.getAvatarIDsList())) return false; + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getNoteID() + != other.getNoteID()) return false; + if (getSetValidJudgedNotes() + != other.getSetValidJudgedNotes()) return false; + if (getSetNoteFailed() + != other.getSetNoteFailed()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAvatarIDsCount() > 0) { + hash = (37 * hash) + AVATARIDS_FIELD_NUMBER; + hash = (53 * hash) + getAvatarIDsList().hashCode(); + } + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + NOTEID_FIELD_NUMBER; + hash = (53 * hash) + getNoteID(); + hash = (37 * hash) + SETVALIDJUDGEDNOTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSetValidJudgedNotes()); + hash = (37 * hash) + SETNOTEFAILED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSetNoteFailed()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIONoteVisibility parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.QwilightIONoteVisibility prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.QwilightIONoteVisibility} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.QwilightIONoteVisibility) + net.taehui.EventClass.Event.QwilightIONoteVisibilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIONoteVisibility_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIONoteVisibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIONoteVisibility.class, net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.QwilightIONoteVisibility.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + noteID_ = 0; + setValidJudgedNotes_ = false; + setNoteFailed_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_QwilightIONoteVisibility_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIONoteVisibility getDefaultInstanceForType() { + return net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIONoteVisibility build() { + net.taehui.EventClass.Event.QwilightIONoteVisibility result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIONoteVisibility buildPartial() { + net.taehui.EventClass.Event.QwilightIONoteVisibility result = new net.taehui.EventClass.Event.QwilightIONoteVisibility(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.QwilightIONoteVisibility result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + avatarIDs_.makeImmutable(); + result.avatarIDs_ = avatarIDs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.noteID_ = noteID_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.setValidJudgedNotes_ = setValidJudgedNotes_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.setNoteFailed_ = setNoteFailed_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.QwilightIONoteVisibility) { + return mergeFrom((net.taehui.EventClass.Event.QwilightIONoteVisibility)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.QwilightIONoteVisibility other) { + if (other == net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance()) return this; + if (!other.avatarIDs_.isEmpty()) { + if (avatarIDs_.isEmpty()) { + avatarIDs_ = other.avatarIDs_; + bitField0_ |= 0x00000001; + } else { + ensureAvatarIDsIsMutable(); + avatarIDs_.addAll(other.avatarIDs_); + } + onChanged(); + } + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getNoteID() != 0) { + setNoteID(other.getNoteID()); + } + if (other.getSetValidJudgedNotes() != false) { + setSetValidJudgedNotes(other.getSetValidJudgedNotes()); + } + if (other.getSetNoteFailed() != false) { + setSetNoteFailed(other.getSetNoteFailed()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(s); + break; + } // case 10 + case 18: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + noteID_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + setValidJudgedNotes_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + setNoteFailed_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAvatarIDsIsMutable() { + if (!avatarIDs_.isModifiable()) { + avatarIDs_ = new com.google.protobuf.LazyStringArrayList(avatarIDs_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + avatarIDs_.makeImmutable(); + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index to set the value at. + * @param value The avatarIDs to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param values The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAllAvatarIDs( + java.lang.Iterable values) { + ensureAvatarIDsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, avatarIDs_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @return This builder for chaining. + */ + public Builder clearAvatarIDs() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The bytes of the avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 2; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int noteID_ ; + /** + * int32 noteID = 3; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + /** + * int32 noteID = 3; + * @param value The noteID to set. + * @return This builder for chaining. + */ + public Builder setNoteID(int value) { + + noteID_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 noteID = 3; + * @return This builder for chaining. + */ + public Builder clearNoteID() { + bitField0_ = (bitField0_ & ~0x00000004); + noteID_ = 0; + onChanged(); + return this; + } + + private boolean setValidJudgedNotes_ ; + /** + * bool setValidJudgedNotes = 4; + * @return The setValidJudgedNotes. + */ + @java.lang.Override + public boolean getSetValidJudgedNotes() { + return setValidJudgedNotes_; + } + /** + * bool setValidJudgedNotes = 4; + * @param value The setValidJudgedNotes to set. + * @return This builder for chaining. + */ + public Builder setSetValidJudgedNotes(boolean value) { + + setValidJudgedNotes_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * bool setValidJudgedNotes = 4; + * @return This builder for chaining. + */ + public Builder clearSetValidJudgedNotes() { + bitField0_ = (bitField0_ & ~0x00000008); + setValidJudgedNotes_ = false; + onChanged(); + return this; + } + + private boolean setNoteFailed_ ; + /** + * bool setNoteFailed = 5; + * @return The setNoteFailed. + */ + @java.lang.Override + public boolean getSetNoteFailed() { + return setNoteFailed_; + } + /** + * bool setNoteFailed = 5; + * @param value The setNoteFailed to set. + * @return This builder for chaining. + */ + public Builder setSetNoteFailed(boolean value) { + + setNoteFailed_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * bool setNoteFailed = 5; + * @return This builder for chaining. + */ + public Builder clearSetNoteFailed() { + bitField0_ = (bitField0_ & ~0x00000010); + setNoteFailed_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.QwilightIONoteVisibility) + } + + // @@protoc_insertion_point(class_scope:Event.QwilightIONoteVisibility) + private static final net.taehui.EventClass.Event.QwilightIONoteVisibility DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.QwilightIONoteVisibility(); + } + + public static net.taehui.EventClass.Event.QwilightIONoteVisibility getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QwilightIONoteVisibility parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIONoteVisibility getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TwilightIONoteVisibilityOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightIONoteVisibility) + com.google.protobuf.MessageOrBuilder { + + /** + * string handlerID = 1; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 noteID = 2; + * @return The noteID. + */ + int getNoteID(); + + /** + * bool setValidJudgedNotes = 3; + * @return The setValidJudgedNotes. + */ + boolean getSetValidJudgedNotes(); + + /** + * bool setNoteFailed = 4; + * @return The setNoteFailed. + */ + boolean getSetNoteFailed(); + } + /** + * Protobuf type {@code Event.TwilightIONoteVisibility} + */ + public static final class TwilightIONoteVisibility extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightIONoteVisibility) + TwilightIONoteVisibilityOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightIONoteVisibility.newBuilder() to construct. + private TwilightIONoteVisibility(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightIONoteVisibility() { + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightIONoteVisibility(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIONoteVisibility_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIONoteVisibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIONoteVisibility.class, net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder.class); + } + + public static final int HANDLERID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NOTEID_FIELD_NUMBER = 2; + private int noteID_ = 0; + /** + * int32 noteID = 2; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + + public static final int SETVALIDJUDGEDNOTES_FIELD_NUMBER = 3; + private boolean setValidJudgedNotes_ = false; + /** + * bool setValidJudgedNotes = 3; + * @return The setValidJudgedNotes. + */ + @java.lang.Override + public boolean getSetValidJudgedNotes() { + return setValidJudgedNotes_; + } + + public static final int SETNOTEFAILED_FIELD_NUMBER = 4; + private boolean setNoteFailed_ = false; + /** + * bool setNoteFailed = 4; + * @return The setNoteFailed. + */ + @java.lang.Override + public boolean getSetNoteFailed() { + return setNoteFailed_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, handlerID_); + } + if (noteID_ != 0) { + output.writeInt32(2, noteID_); + } + if (setValidJudgedNotes_ != false) { + output.writeBool(3, setValidJudgedNotes_); + } + if (setNoteFailed_ != false) { + output.writeBool(4, setNoteFailed_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, handlerID_); + } + if (noteID_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, noteID_); + } + if (setValidJudgedNotes_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, setValidJudgedNotes_); + } + if (setNoteFailed_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(4, setNoteFailed_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightIONoteVisibility)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightIONoteVisibility other = (net.taehui.EventClass.Event.TwilightIONoteVisibility) obj; + + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getNoteID() + != other.getNoteID()) return false; + if (getSetValidJudgedNotes() + != other.getSetValidJudgedNotes()) return false; + if (getSetNoteFailed() + != other.getSetNoteFailed()) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + NOTEID_FIELD_NUMBER; + hash = (53 * hash) + getNoteID(); + hash = (37 * hash) + SETVALIDJUDGEDNOTES_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSetValidJudgedNotes()); + hash = (37 * hash) + SETNOTEFAILED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getSetNoteFailed()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIONoteVisibility parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightIONoteVisibility prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightIONoteVisibility} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightIONoteVisibility) + net.taehui.EventClass.Event.TwilightIONoteVisibilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIONoteVisibility_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIONoteVisibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIONoteVisibility.class, net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightIONoteVisibility.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + handlerID_ = ""; + noteID_ = 0; + setValidJudgedNotes_ = false; + setNoteFailed_ = false; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightIONoteVisibility_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIONoteVisibility getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIONoteVisibility build() { + net.taehui.EventClass.Event.TwilightIONoteVisibility result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIONoteVisibility buildPartial() { + net.taehui.EventClass.Event.TwilightIONoteVisibility result = new net.taehui.EventClass.Event.TwilightIONoteVisibility(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightIONoteVisibility result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.noteID_ = noteID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.setValidJudgedNotes_ = setValidJudgedNotes_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.setNoteFailed_ = setNoteFailed_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightIONoteVisibility) { + return mergeFrom((net.taehui.EventClass.Event.TwilightIONoteVisibility)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightIONoteVisibility other) { + if (other == net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance()) return this; + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getNoteID() != 0) { + setNoteID(other.getNoteID()); + } + if (other.getSetValidJudgedNotes() != false) { + setSetValidJudgedNotes(other.getSetValidJudgedNotes()); + } + if (other.getSetNoteFailed() != false) { + setSetNoteFailed(other.getSetNoteFailed()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + noteID_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + setValidJudgedNotes_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + setNoteFailed_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 1; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int noteID_ ; + /** + * int32 noteID = 2; + * @return The noteID. + */ + @java.lang.Override + public int getNoteID() { + return noteID_; + } + /** + * int32 noteID = 2; + * @param value The noteID to set. + * @return This builder for chaining. + */ + public Builder setNoteID(int value) { + + noteID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 noteID = 2; + * @return This builder for chaining. + */ + public Builder clearNoteID() { + bitField0_ = (bitField0_ & ~0x00000002); + noteID_ = 0; + onChanged(); + return this; + } + + private boolean setValidJudgedNotes_ ; + /** + * bool setValidJudgedNotes = 3; + * @return The setValidJudgedNotes. + */ + @java.lang.Override + public boolean getSetValidJudgedNotes() { + return setValidJudgedNotes_; + } + /** + * bool setValidJudgedNotes = 3; + * @param value The setValidJudgedNotes to set. + * @return This builder for chaining. + */ + public Builder setSetValidJudgedNotes(boolean value) { + + setValidJudgedNotes_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * bool setValidJudgedNotes = 3; + * @return This builder for chaining. + */ + public Builder clearSetValidJudgedNotes() { + bitField0_ = (bitField0_ & ~0x00000004); + setValidJudgedNotes_ = false; + onChanged(); + return this; + } + + private boolean setNoteFailed_ ; + /** + * bool setNoteFailed = 4; + * @return The setNoteFailed. + */ + @java.lang.Override + public boolean getSetNoteFailed() { + return setNoteFailed_; + } + /** + * bool setNoteFailed = 4; + * @param value The setNoteFailed to set. + * @return This builder for chaining. + */ + public Builder setSetNoteFailed(boolean value) { + + setNoteFailed_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * bool setNoteFailed = 4; + * @return This builder for chaining. + */ + public Builder clearSetNoteFailed() { + bitField0_ = (bitField0_ & ~0x00000008); + setNoteFailed_ = false; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightIONoteVisibility) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightIONoteVisibility) + private static final net.taehui.EventClass.Event.TwilightIONoteVisibility DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightIONoteVisibility(); + } + + public static net.taehui.EventClass.Event.TwilightIONoteVisibility getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightIONoteVisibility parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIONoteVisibility getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QwilightIOMultiplierOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.QwilightIOMultiplier) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + java.util.List + getAvatarIDsList(); + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + int getAvatarIDsCount(); + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + java.lang.String getAvatarIDs(int index); + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + com.google.protobuf.ByteString + getAvatarIDsBytes(int index); + + /** + * string handlerID = 2; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * double multiplier = 3; + * @return The multiplier. + */ + double getMultiplier(); + } + /** + * Protobuf type {@code Event.QwilightIOMultiplier} + */ + public static final class QwilightIOMultiplier extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.QwilightIOMultiplier) + QwilightIOMultiplierOrBuilder { + private static final long serialVersionUID = 0L; + // Use QwilightIOMultiplier.newBuilder() to construct. + private QwilightIOMultiplier(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QwilightIOMultiplier() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QwilightIOMultiplier(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOMultiplier.class, net.taehui.EventClass.Event.QwilightIOMultiplier.Builder.class); + } + + public static final int AVATARIDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + + public static final int HANDLERID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MULTIPLIER_FIELD_NUMBER = 3; + private double multiplier_ = 0D; + /** + * double multiplier = 3; + * @return The multiplier. + */ + @java.lang.Override + public double getMultiplier() { + return multiplier_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < avatarIDs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, avatarIDs_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handlerID_); + } + if (java.lang.Double.doubleToRawLongBits(multiplier_) != 0) { + output.writeDouble(3, multiplier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < avatarIDs_.size(); i++) { + dataSize += computeStringSizeNoTag(avatarIDs_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvatarIDsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handlerID_); + } + if (java.lang.Double.doubleToRawLongBits(multiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, multiplier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.QwilightIOMultiplier)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.QwilightIOMultiplier other = (net.taehui.EventClass.Event.QwilightIOMultiplier) obj; + + if (!getAvatarIDsList() + .equals(other.getAvatarIDsList())) return false; + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (java.lang.Double.doubleToLongBits(getMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getMultiplier())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAvatarIDsCount() > 0) { + hash = (37 * hash) + AVATARIDS_FIELD_NUMBER; + hash = (53 * hash) + getAvatarIDsList().hashCode(); + } + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + MULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMultiplier())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOMultiplier parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.QwilightIOMultiplier prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.QwilightIOMultiplier} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.QwilightIOMultiplier) + net.taehui.EventClass.Event.QwilightIOMultiplierOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOMultiplier.class, net.taehui.EventClass.Event.QwilightIOMultiplier.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.QwilightIOMultiplier.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + multiplier_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_QwilightIOMultiplier_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOMultiplier getDefaultInstanceForType() { + return net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOMultiplier build() { + net.taehui.EventClass.Event.QwilightIOMultiplier result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOMultiplier buildPartial() { + net.taehui.EventClass.Event.QwilightIOMultiplier result = new net.taehui.EventClass.Event.QwilightIOMultiplier(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.QwilightIOMultiplier result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + avatarIDs_.makeImmutable(); + result.avatarIDs_ = avatarIDs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.multiplier_ = multiplier_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.QwilightIOMultiplier) { + return mergeFrom((net.taehui.EventClass.Event.QwilightIOMultiplier)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.QwilightIOMultiplier other) { + if (other == net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance()) return this; + if (!other.avatarIDs_.isEmpty()) { + if (avatarIDs_.isEmpty()) { + avatarIDs_ = other.avatarIDs_; + bitField0_ |= 0x00000001; + } else { + ensureAvatarIDsIsMutable(); + avatarIDs_.addAll(other.avatarIDs_); + } + onChanged(); + } + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getMultiplier() != 0D) { + setMultiplier(other.getMultiplier()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(s); + break; + } // case 10 + case 18: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 25: { + multiplier_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAvatarIDsIsMutable() { + if (!avatarIDs_.isModifiable()) { + avatarIDs_ = new com.google.protobuf.LazyStringArrayList(avatarIDs_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + avatarIDs_.makeImmutable(); + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index to set the value at. + * @param value The avatarIDs to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param values The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAllAvatarIDs( + java.lang.Iterable values) { + ensureAvatarIDsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, avatarIDs_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @return This builder for chaining. + */ + public Builder clearAvatarIDs() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The bytes of the avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 2; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private double multiplier_ ; + /** + * double multiplier = 3; + * @return The multiplier. + */ + @java.lang.Override + public double getMultiplier() { + return multiplier_; + } + /** + * double multiplier = 3; + * @param value The multiplier to set. + * @return This builder for chaining. + */ + public Builder setMultiplier(double value) { + + multiplier_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * double multiplier = 3; + * @return This builder for chaining. + */ + public Builder clearMultiplier() { + bitField0_ = (bitField0_ & ~0x00000004); + multiplier_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.QwilightIOMultiplier) + } + + // @@protoc_insertion_point(class_scope:Event.QwilightIOMultiplier) + private static final net.taehui.EventClass.Event.QwilightIOMultiplier DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.QwilightIOMultiplier(); + } + + public static net.taehui.EventClass.Event.QwilightIOMultiplier getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QwilightIOMultiplier parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOMultiplier getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TwilightIOMultiplierOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightIOMultiplier) + com.google.protobuf.MessageOrBuilder { + + /** + * string handlerID = 1; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * double multiplier = 2; + * @return The multiplier. + */ + double getMultiplier(); + } + /** + * Protobuf type {@code Event.TwilightIOMultiplier} + */ + public static final class TwilightIOMultiplier extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightIOMultiplier) + TwilightIOMultiplierOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightIOMultiplier.newBuilder() to construct. + private TwilightIOMultiplier(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightIOMultiplier() { + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightIOMultiplier(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOMultiplier.class, net.taehui.EventClass.Event.TwilightIOMultiplier.Builder.class); + } + + public static final int HANDLERID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MULTIPLIER_FIELD_NUMBER = 2; + private double multiplier_ = 0D; + /** + * double multiplier = 2; + * @return The multiplier. + */ + @java.lang.Override + public double getMultiplier() { + return multiplier_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, handlerID_); + } + if (java.lang.Double.doubleToRawLongBits(multiplier_) != 0) { + output.writeDouble(2, multiplier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, handlerID_); + } + if (java.lang.Double.doubleToRawLongBits(multiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, multiplier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightIOMultiplier)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightIOMultiplier other = (net.taehui.EventClass.Event.TwilightIOMultiplier) obj; + + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (java.lang.Double.doubleToLongBits(getMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getMultiplier())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + MULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getMultiplier())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOMultiplier parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightIOMultiplier prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightIOMultiplier} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightIOMultiplier) + net.taehui.EventClass.Event.TwilightIOMultiplierOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOMultiplier.class, net.taehui.EventClass.Event.TwilightIOMultiplier.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightIOMultiplier.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + handlerID_ = ""; + multiplier_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightIOMultiplier_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOMultiplier getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOMultiplier build() { + net.taehui.EventClass.Event.TwilightIOMultiplier result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOMultiplier buildPartial() { + net.taehui.EventClass.Event.TwilightIOMultiplier result = new net.taehui.EventClass.Event.TwilightIOMultiplier(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightIOMultiplier result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.multiplier_ = multiplier_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightIOMultiplier) { + return mergeFrom((net.taehui.EventClass.Event.TwilightIOMultiplier)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightIOMultiplier other) { + if (other == net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance()) return this; + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getMultiplier() != 0D) { + setMultiplier(other.getMultiplier()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: { + multiplier_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 1; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private double multiplier_ ; + /** + * double multiplier = 2; + * @return The multiplier. + */ + @java.lang.Override + public double getMultiplier() { + return multiplier_; + } + /** + * double multiplier = 2; + * @param value The multiplier to set. + * @return This builder for chaining. + */ + public Builder setMultiplier(double value) { + + multiplier_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * double multiplier = 2; + * @return This builder for chaining. + */ + public Builder clearMultiplier() { + bitField0_ = (bitField0_ & ~0x00000002); + multiplier_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightIOMultiplier) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightIOMultiplier) + private static final net.taehui.EventClass.Event.TwilightIOMultiplier DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightIOMultiplier(); + } + + public static net.taehui.EventClass.Event.TwilightIOMultiplier getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightIOMultiplier parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOMultiplier getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QwilightIOAudioMultiplierOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.QwilightIOAudioMultiplier) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + java.util.List + getAvatarIDsList(); + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + int getAvatarIDsCount(); + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + java.lang.String getAvatarIDs(int index); + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + com.google.protobuf.ByteString + getAvatarIDsBytes(int index); + + /** + * string handlerID = 2; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * double audioMultiplier = 3; + * @return The audioMultiplier. + */ + double getAudioMultiplier(); + } + /** + * Protobuf type {@code Event.QwilightIOAudioMultiplier} + */ + public static final class QwilightIOAudioMultiplier extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.QwilightIOAudioMultiplier) + QwilightIOAudioMultiplierOrBuilder { + private static final long serialVersionUID = 0L; + // Use QwilightIOAudioMultiplier.newBuilder() to construct. + private QwilightIOAudioMultiplier(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QwilightIOAudioMultiplier() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QwilightIOAudioMultiplier(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOAudioMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOAudioMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOAudioMultiplier.class, net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder.class); + } + + public static final int AVATARIDS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + + public static final int HANDLERID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIOMULTIPLIER_FIELD_NUMBER = 3; + private double audioMultiplier_ = 0D; + /** + * double audioMultiplier = 3; + * @return The audioMultiplier. + */ + @java.lang.Override + public double getAudioMultiplier() { + return audioMultiplier_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < avatarIDs_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, avatarIDs_.getRaw(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handlerID_); + } + if (java.lang.Double.doubleToRawLongBits(audioMultiplier_) != 0) { + output.writeDouble(3, audioMultiplier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < avatarIDs_.size(); i++) { + dataSize += computeStringSizeNoTag(avatarIDs_.getRaw(i)); + } + size += dataSize; + size += 1 * getAvatarIDsList().size(); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handlerID_); + } + if (java.lang.Double.doubleToRawLongBits(audioMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, audioMultiplier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.QwilightIOAudioMultiplier)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.QwilightIOAudioMultiplier other = (net.taehui.EventClass.Event.QwilightIOAudioMultiplier) obj; + + if (!getAvatarIDsList() + .equals(other.getAvatarIDsList())) return false; + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (java.lang.Double.doubleToLongBits(getAudioMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getAudioMultiplier())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAvatarIDsCount() > 0) { + hash = (37 * hash) + AVATARIDS_FIELD_NUMBER; + hash = (53 * hash) + getAvatarIDsList().hashCode(); + } + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + AUDIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAudioMultiplier())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.QwilightIOAudioMultiplier prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.QwilightIOAudioMultiplier} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.QwilightIOAudioMultiplier) + net.taehui.EventClass.Event.QwilightIOAudioMultiplierOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightIOAudioMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightIOAudioMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightIOAudioMultiplier.class, net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.QwilightIOAudioMultiplier.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + handlerID_ = ""; + audioMultiplier_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_QwilightIOAudioMultiplier_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOAudioMultiplier getDefaultInstanceForType() { + return net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOAudioMultiplier build() { + net.taehui.EventClass.Event.QwilightIOAudioMultiplier result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOAudioMultiplier buildPartial() { + net.taehui.EventClass.Event.QwilightIOAudioMultiplier result = new net.taehui.EventClass.Event.QwilightIOAudioMultiplier(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.QwilightIOAudioMultiplier result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + avatarIDs_.makeImmutable(); + result.avatarIDs_ = avatarIDs_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.audioMultiplier_ = audioMultiplier_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.QwilightIOAudioMultiplier) { + return mergeFrom((net.taehui.EventClass.Event.QwilightIOAudioMultiplier)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.QwilightIOAudioMultiplier other) { + if (other == net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance()) return this; + if (!other.avatarIDs_.isEmpty()) { + if (avatarIDs_.isEmpty()) { + avatarIDs_ = other.avatarIDs_; + bitField0_ |= 0x00000001; + } else { + ensureAvatarIDsIsMutable(); + avatarIDs_.addAll(other.avatarIDs_); + } + onChanged(); + } + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getAudioMultiplier() != 0D) { + setAudioMultiplier(other.getAudioMultiplier()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(s); + break; + } // case 10 + case 18: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 25: { + audioMultiplier_ = input.readDouble(); + bitField0_ |= 0x00000004; + break; + } // case 25 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringArrayList avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + private void ensureAvatarIDsIsMutable() { + if (!avatarIDs_.isModifiable()) { + avatarIDs_ = new com.google.protobuf.LazyStringArrayList(avatarIDs_); + } + bitField0_ |= 0x00000001; + } + /** + * repeated string avatarIDs = 1; + * @return A list containing the avatarIDs. + */ + public com.google.protobuf.ProtocolStringList + getAvatarIDsList() { + avatarIDs_.makeImmutable(); + return avatarIDs_; + } + /** + * repeated string avatarIDs = 1; + * @return The count of avatarIDs. + */ + public int getAvatarIDsCount() { + return avatarIDs_.size(); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the element to return. + * @return The avatarIDs at the given index. + */ + public java.lang.String getAvatarIDs(int index) { + return avatarIDs_.get(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index of the value to return. + * @return The bytes of the avatarIDs at the given index. + */ + public com.google.protobuf.ByteString + getAvatarIDsBytes(int index) { + return avatarIDs_.getByteString(index); + } + /** + * repeated string avatarIDs = 1; + * @param index The index to set the value at. + * @param value The avatarIDs to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDs( + int index, java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.set(index, value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDs( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param values The avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAllAvatarIDs( + java.lang.Iterable values) { + ensureAvatarIDsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, avatarIDs_); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @return This builder for chaining. + */ + public Builder clearAvatarIDs() { + avatarIDs_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; + onChanged(); + return this; + } + /** + * repeated string avatarIDs = 1; + * @param value The bytes of the avatarIDs to add. + * @return This builder for chaining. + */ + public Builder addAvatarIDsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + ensureAvatarIDsIsMutable(); + avatarIDs_.add(value); + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 2; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private double audioMultiplier_ ; + /** + * double audioMultiplier = 3; + * @return The audioMultiplier. + */ + @java.lang.Override + public double getAudioMultiplier() { + return audioMultiplier_; + } + /** + * double audioMultiplier = 3; + * @param value The audioMultiplier to set. + * @return This builder for chaining. + */ + public Builder setAudioMultiplier(double value) { + + audioMultiplier_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * double audioMultiplier = 3; + * @return This builder for chaining. + */ + public Builder clearAudioMultiplier() { + bitField0_ = (bitField0_ & ~0x00000004); + audioMultiplier_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.QwilightIOAudioMultiplier) + } + + // @@protoc_insertion_point(class_scope:Event.QwilightIOAudioMultiplier) + private static final net.taehui.EventClass.Event.QwilightIOAudioMultiplier DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.QwilightIOAudioMultiplier(); + } + + public static net.taehui.EventClass.Event.QwilightIOAudioMultiplier getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QwilightIOAudioMultiplier parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOAudioMultiplier getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TwilightIOAudioMultiplierOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightIOAudioMultiplier) + com.google.protobuf.MessageOrBuilder { + + /** + * string handlerID = 1; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * double audioMultiplier = 2; + * @return The audioMultiplier. + */ + double getAudioMultiplier(); + } + /** + * Protobuf type {@code Event.TwilightIOAudioMultiplier} + */ + public static final class TwilightIOAudioMultiplier extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightIOAudioMultiplier) + TwilightIOAudioMultiplierOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightIOAudioMultiplier.newBuilder() to construct. + private TwilightIOAudioMultiplier(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightIOAudioMultiplier() { + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightIOAudioMultiplier(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOAudioMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOAudioMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOAudioMultiplier.class, net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder.class); + } + + public static final int HANDLERID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUDIOMULTIPLIER_FIELD_NUMBER = 2; + private double audioMultiplier_ = 0D; + /** + * double audioMultiplier = 2; + * @return The audioMultiplier. + */ + @java.lang.Override + public double getAudioMultiplier() { + return audioMultiplier_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, handlerID_); + } + if (java.lang.Double.doubleToRawLongBits(audioMultiplier_) != 0) { + output.writeDouble(2, audioMultiplier_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, handlerID_); + } + if (java.lang.Double.doubleToRawLongBits(audioMultiplier_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, audioMultiplier_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightIOAudioMultiplier)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightIOAudioMultiplier other = (net.taehui.EventClass.Event.TwilightIOAudioMultiplier) obj; + + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (java.lang.Double.doubleToLongBits(getAudioMultiplier()) + != java.lang.Double.doubleToLongBits( + other.getAudioMultiplier())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + AUDIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getAudioMultiplier())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightIOAudioMultiplier prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightIOAudioMultiplier} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightIOAudioMultiplier) + net.taehui.EventClass.Event.TwilightIOAudioMultiplierOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightIOAudioMultiplier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightIOAudioMultiplier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightIOAudioMultiplier.class, net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightIOAudioMultiplier.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + handlerID_ = ""; + audioMultiplier_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightIOAudioMultiplier_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOAudioMultiplier getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOAudioMultiplier build() { + net.taehui.EventClass.Event.TwilightIOAudioMultiplier result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOAudioMultiplier buildPartial() { + net.taehui.EventClass.Event.TwilightIOAudioMultiplier result = new net.taehui.EventClass.Event.TwilightIOAudioMultiplier(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightIOAudioMultiplier result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.audioMultiplier_ = audioMultiplier_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightIOAudioMultiplier) { + return mergeFrom((net.taehui.EventClass.Event.TwilightIOAudioMultiplier)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightIOAudioMultiplier other) { + if (other == net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance()) return this; + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getAudioMultiplier() != 0D) { + setAudioMultiplier(other.getAudioMultiplier()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 17: { + audioMultiplier_ = input.readDouble(); + bitField0_ |= 0x00000002; + break; + } // case 17 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 1; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private double audioMultiplier_ ; + /** + * double audioMultiplier = 2; + * @return The audioMultiplier. + */ + @java.lang.Override + public double getAudioMultiplier() { + return audioMultiplier_; + } + /** + * double audioMultiplier = 2; + * @param value The audioMultiplier to set. + * @return This builder for chaining. + */ + public Builder setAudioMultiplier(double value) { + + audioMultiplier_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * double audioMultiplier = 2; + * @return This builder for chaining. + */ + public Builder clearAudioMultiplier() { + bitField0_ = (bitField0_ & ~0x00000002); + audioMultiplier_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightIOAudioMultiplier) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightIOAudioMultiplier) + private static final net.taehui.EventClass.Event.TwilightIOAudioMultiplier DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightIOAudioMultiplier(); + } + + public static net.taehui.EventClass.Event.TwilightIOAudioMultiplier getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightIOAudioMultiplier parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOAudioMultiplier getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TwilightAudioInputOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightAudioInput) + com.google.protobuf.MessageOrBuilder { + + /** + * string siteID = 1; + * @return The siteID. + */ + java.lang.String getSiteID(); + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + com.google.protobuf.ByteString + getSiteIDBytes(); + + /** + * string avatarID = 2; + * @return The avatarID. + */ + java.lang.String getAvatarID(); + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + com.google.protobuf.ByteString + getAvatarIDBytes(); + } + /** + * Protobuf type {@code Event.TwilightAudioInput} + */ + public static final class TwilightAudioInput extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightAudioInput) + TwilightAudioInputOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightAudioInput.newBuilder() to construct. + private TwilightAudioInput(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightAudioInput() { + siteID_ = ""; + avatarID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightAudioInput(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightAudioInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightAudioInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightAudioInput.class, net.taehui.EventClass.Event.TwilightAudioInput.Builder.class); + } + + public static final int SITEID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object siteID_ = ""; + /** + * string siteID = 1; + * @return The siteID. + */ + @java.lang.Override + public java.lang.String getSiteID() { + java.lang.Object ref = siteID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteID_ = s; + return s; + } + } + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSiteIDBytes() { + java.lang.Object ref = siteID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AVATARID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object avatarID_ = ""; + /** + * string avatarID = 2; + * @return The avatarID. + */ + @java.lang.Override + public java.lang.String getAvatarID() { + java.lang.Object ref = avatarID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarID_ = s; + return s; + } + } + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvatarIDBytes() { + java.lang.Object ref = avatarID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, avatarID_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, avatarID_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightAudioInput)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightAudioInput other = (net.taehui.EventClass.Event.TwilightAudioInput) obj; + + if (!getSiteID() + .equals(other.getSiteID())) return false; + if (!getAvatarID() + .equals(other.getAvatarID())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITEID_FIELD_NUMBER; + hash = (53 * hash) + getSiteID().hashCode(); + hash = (37 * hash) + AVATARID_FIELD_NUMBER; + hash = (53 * hash) + getAvatarID().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightAudioInput parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightAudioInput parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightAudioInput parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightAudioInput prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightAudioInput} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightAudioInput) + net.taehui.EventClass.Event.TwilightAudioInputOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightAudioInput_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightAudioInput_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightAudioInput.class, net.taehui.EventClass.Event.TwilightAudioInput.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightAudioInput.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + siteID_ = ""; + avatarID_ = ""; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightAudioInput_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightAudioInput getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightAudioInput build() { + net.taehui.EventClass.Event.TwilightAudioInput result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightAudioInput buildPartial() { + net.taehui.EventClass.Event.TwilightAudioInput result = new net.taehui.EventClass.Event.TwilightAudioInput(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightAudioInput result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.siteID_ = siteID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.avatarID_ = avatarID_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightAudioInput) { + return mergeFrom((net.taehui.EventClass.Event.TwilightAudioInput)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightAudioInput other) { + if (other == net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance()) return this; + if (!other.getSiteID().isEmpty()) { + siteID_ = other.siteID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getAvatarID().isEmpty()) { + avatarID_ = other.avatarID_; + bitField0_ |= 0x00000002; + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + siteID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + avatarID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object siteID_ = ""; + /** + * string siteID = 1; + * @return The siteID. + */ + public java.lang.String getSiteID() { + java.lang.Object ref = siteID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + public com.google.protobuf.ByteString + getSiteIDBytes() { + java.lang.Object ref = siteID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string siteID = 1; + * @param value The siteID to set. + * @return This builder for chaining. + */ + public Builder setSiteID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + siteID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string siteID = 1; + * @return This builder for chaining. + */ + public Builder clearSiteID() { + siteID_ = getDefaultInstance().getSiteID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string siteID = 1; + * @param value The bytes for siteID to set. + * @return This builder for chaining. + */ + public Builder setSiteIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + siteID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object avatarID_ = ""; + /** + * string avatarID = 2; + * @return The avatarID. + */ + public java.lang.String getAvatarID() { + java.lang.Object ref = avatarID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + public com.google.protobuf.ByteString + getAvatarIDBytes() { + java.lang.Object ref = avatarID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string avatarID = 2; + * @param value The avatarID to set. + * @return This builder for chaining. + */ + public Builder setAvatarID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avatarID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string avatarID = 2; + * @return This builder for chaining. + */ + public Builder clearAvatarID() { + avatarID_ = getDefaultInstance().getAvatarID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string avatarID = 2; + * @param value The bytes for avatarID to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatarID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightAudioInput) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightAudioInput) + private static final net.taehui.EventClass.Event.TwilightAudioInput DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightAudioInput(); + } + + public static net.taehui.EventClass.Event.TwilightAudioInput getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightAudioInput parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightAudioInput getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface QwilightPostItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.QwilightPostItem) + com.google.protobuf.MessageOrBuilder { + + /** + * string siteID = 1; + * @return The siteID. + */ + java.lang.String getSiteID(); + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + com.google.protobuf.ByteString + getSiteIDBytes(); + + /** + * string handlerID = 2; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 postedItem = 3; + * @return The postedItem. + */ + int getPostedItem(); + + /** + * int32 isPositive = 4; + * @return The isPositive. + */ + int getIsPositive(); + + /** + * double lowestWait = 5; + * @return The lowestWait. + */ + double getLowestWait(); + + /** + * double highestWait = 6; + * @return The highestWait. + */ + double getHighestWait(); + } + /** + * Protobuf type {@code Event.QwilightPostItem} + */ + public static final class QwilightPostItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.QwilightPostItem) + QwilightPostItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use QwilightPostItem.newBuilder() to construct. + private QwilightPostItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private QwilightPostItem() { + siteID_ = ""; + handlerID_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new QwilightPostItem(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightPostItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightPostItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightPostItem.class, net.taehui.EventClass.Event.QwilightPostItem.Builder.class); + } + + public static final int SITEID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object siteID_ = ""; + /** + * string siteID = 1; + * @return The siteID. + */ + @java.lang.Override + public java.lang.String getSiteID() { + java.lang.Object ref = siteID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteID_ = s; + return s; + } + } + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getSiteIDBytes() { + java.lang.Object ref = siteID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int HANDLERID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSTEDITEM_FIELD_NUMBER = 3; + private int postedItem_ = 0; + /** + * int32 postedItem = 3; + * @return The postedItem. + */ + @java.lang.Override + public int getPostedItem() { + return postedItem_; + } + + public static final int ISPOSITIVE_FIELD_NUMBER = 4; + private int isPositive_ = 0; + /** + * int32 isPositive = 4; + * @return The isPositive. + */ + @java.lang.Override + public int getIsPositive() { + return isPositive_; + } + + public static final int LOWESTWAIT_FIELD_NUMBER = 5; + private double lowestWait_ = 0D; + /** + * double lowestWait = 5; + * @return The lowestWait. + */ + @java.lang.Override + public double getLowestWait() { + return lowestWait_; + } + + public static final int HIGHESTWAIT_FIELD_NUMBER = 6; + private double highestWait_ = 0D; + /** + * double highestWait = 6; + * @return The highestWait. + */ + @java.lang.Override + public double getHighestWait() { + return highestWait_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, siteID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, handlerID_); + } + if (postedItem_ != 0) { + output.writeInt32(3, postedItem_); + } + if (isPositive_ != 0) { + output.writeInt32(4, isPositive_); + } + if (java.lang.Double.doubleToRawLongBits(lowestWait_) != 0) { + output.writeDouble(5, lowestWait_); + } + if (java.lang.Double.doubleToRawLongBits(highestWait_) != 0) { + output.writeDouble(6, highestWait_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(siteID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, siteID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, handlerID_); + } + if (postedItem_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, postedItem_); + } + if (isPositive_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, isPositive_); + } + if (java.lang.Double.doubleToRawLongBits(lowestWait_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(5, lowestWait_); + } + if (java.lang.Double.doubleToRawLongBits(highestWait_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, highestWait_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.QwilightPostItem)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.QwilightPostItem other = (net.taehui.EventClass.Event.QwilightPostItem) obj; + + if (!getSiteID() + .equals(other.getSiteID())) return false; + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getPostedItem() + != other.getPostedItem()) return false; + if (getIsPositive() + != other.getIsPositive()) return false; + if (java.lang.Double.doubleToLongBits(getLowestWait()) + != java.lang.Double.doubleToLongBits( + other.getLowestWait())) return false; + if (java.lang.Double.doubleToLongBits(getHighestWait()) + != java.lang.Double.doubleToLongBits( + other.getHighestWait())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SITEID_FIELD_NUMBER; + hash = (53 * hash) + getSiteID().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + POSTEDITEM_FIELD_NUMBER; + hash = (53 * hash) + getPostedItem(); + hash = (37 * hash) + ISPOSITIVE_FIELD_NUMBER; + hash = (53 * hash) + getIsPositive(); + hash = (37 * hash) + LOWESTWAIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getLowestWait())); + hash = (37 * hash) + HIGHESTWAIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getHighestWait())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.QwilightPostItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.QwilightPostItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.QwilightPostItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.QwilightPostItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.QwilightPostItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.QwilightPostItem) + net.taehui.EventClass.Event.QwilightPostItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_QwilightPostItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_QwilightPostItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.QwilightPostItem.class, net.taehui.EventClass.Event.QwilightPostItem.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.QwilightPostItem.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + siteID_ = ""; + handlerID_ = ""; + postedItem_ = 0; + isPositive_ = 0; + lowestWait_ = 0D; + highestWait_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_QwilightPostItem_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightPostItem getDefaultInstanceForType() { + return net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightPostItem build() { + net.taehui.EventClass.Event.QwilightPostItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightPostItem buildPartial() { + net.taehui.EventClass.Event.QwilightPostItem result = new net.taehui.EventClass.Event.QwilightPostItem(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.QwilightPostItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.siteID_ = siteID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.postedItem_ = postedItem_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.isPositive_ = isPositive_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.lowestWait_ = lowestWait_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.highestWait_ = highestWait_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.QwilightPostItem) { + return mergeFrom((net.taehui.EventClass.Event.QwilightPostItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.QwilightPostItem other) { + if (other == net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance()) return this; + if (!other.getSiteID().isEmpty()) { + siteID_ = other.siteID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.getPostedItem() != 0) { + setPostedItem(other.getPostedItem()); + } + if (other.getIsPositive() != 0) { + setIsPositive(other.getIsPositive()); + } + if (other.getLowestWait() != 0D) { + setLowestWait(other.getLowestWait()); + } + if (other.getHighestWait() != 0D) { + setHighestWait(other.getHighestWait()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + siteID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + postedItem_ = input.readInt32(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + isPositive_ = input.readInt32(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 41: { + lowestWait_ = input.readDouble(); + bitField0_ |= 0x00000010; + break; + } // case 41 + case 49: { + highestWait_ = input.readDouble(); + bitField0_ |= 0x00000020; + break; + } // case 49 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object siteID_ = ""; + /** + * string siteID = 1; + * @return The siteID. + */ + public java.lang.String getSiteID() { + java.lang.Object ref = siteID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + siteID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string siteID = 1; + * @return The bytes for siteID. + */ + public com.google.protobuf.ByteString + getSiteIDBytes() { + java.lang.Object ref = siteID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + siteID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string siteID = 1; + * @param value The siteID to set. + * @return This builder for chaining. + */ + public Builder setSiteID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + siteID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string siteID = 1; + * @return This builder for chaining. + */ + public Builder clearSiteID() { + siteID_ = getDefaultInstance().getSiteID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string siteID = 1; + * @param value The bytes for siteID to set. + * @return This builder for chaining. + */ + public Builder setSiteIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + siteID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 2; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 2; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 2; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string handlerID = 2; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int postedItem_ ; + /** + * int32 postedItem = 3; + * @return The postedItem. + */ + @java.lang.Override + public int getPostedItem() { + return postedItem_; + } + /** + * int32 postedItem = 3; + * @param value The postedItem to set. + * @return This builder for chaining. + */ + public Builder setPostedItem(int value) { + + postedItem_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * int32 postedItem = 3; + * @return This builder for chaining. + */ + public Builder clearPostedItem() { + bitField0_ = (bitField0_ & ~0x00000004); + postedItem_ = 0; + onChanged(); + return this; + } + + private int isPositive_ ; + /** + * int32 isPositive = 4; + * @return The isPositive. + */ + @java.lang.Override + public int getIsPositive() { + return isPositive_; + } + /** + * int32 isPositive = 4; + * @param value The isPositive to set. + * @return This builder for chaining. + */ + public Builder setIsPositive(int value) { + + isPositive_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * int32 isPositive = 4; + * @return This builder for chaining. + */ + public Builder clearIsPositive() { + bitField0_ = (bitField0_ & ~0x00000008); + isPositive_ = 0; + onChanged(); + return this; + } + + private double lowestWait_ ; + /** + * double lowestWait = 5; + * @return The lowestWait. + */ + @java.lang.Override + public double getLowestWait() { + return lowestWait_; + } + /** + * double lowestWait = 5; + * @param value The lowestWait to set. + * @return This builder for chaining. + */ + public Builder setLowestWait(double value) { + + lowestWait_ = value; + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * double lowestWait = 5; + * @return This builder for chaining. + */ + public Builder clearLowestWait() { + bitField0_ = (bitField0_ & ~0x00000010); + lowestWait_ = 0D; + onChanged(); + return this; + } + + private double highestWait_ ; + /** + * double highestWait = 6; + * @return The highestWait. + */ + @java.lang.Override + public double getHighestWait() { + return highestWait_; + } + /** + * double highestWait = 6; + * @param value The highestWait to set. + * @return This builder for chaining. + */ + public Builder setHighestWait(double value) { + + highestWait_ = value; + bitField0_ |= 0x00000020; + onChanged(); + return this; + } + /** + * double highestWait = 6; + * @return This builder for chaining. + */ + public Builder clearHighestWait() { + bitField0_ = (bitField0_ & ~0x00000020); + highestWait_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.QwilightPostItem) + } + + // @@protoc_insertion_point(class_scope:Event.QwilightPostItem) + private static final net.taehui.EventClass.Event.QwilightPostItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.QwilightPostItem(); + } + + public static net.taehui.EventClass.Event.QwilightPostItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QwilightPostItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.QwilightPostItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public interface TwilightPostItemOrBuilder extends + // @@protoc_insertion_point(interface_extends:Event.TwilightPostItem) + com.google.protobuf.MessageOrBuilder { + + /** + * string handlerID = 1; + * @return The handlerID. + */ + java.lang.String getHandlerID(); + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + com.google.protobuf.ByteString + getHandlerIDBytes(); + + /** + * int32 postedItem = 2; + * @return The postedItem. + */ + int getPostedItem(); + + /** + * string avatarName = 3; + * @return The avatarName. + */ + java.lang.String getAvatarName(); + /** + * string avatarName = 3; + * @return The bytes for avatarName. + */ + com.google.protobuf.ByteString + getAvatarNameBytes(); + + /** + * double wait = 4; + * @return The wait. + */ + double getWait(); + } + /** + * Protobuf type {@code Event.TwilightPostItem} + */ + public static final class TwilightPostItem extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Event.TwilightPostItem) + TwilightPostItemOrBuilder { + private static final long serialVersionUID = 0L; + // Use TwilightPostItem.newBuilder() to construct. + private TwilightPostItem(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TwilightPostItem() { + handlerID_ = ""; + avatarName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new TwilightPostItem(); + } + + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightPostItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightPostItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightPostItem.class, net.taehui.EventClass.Event.TwilightPostItem.Builder.class); + } + + public static final int HANDLERID_FIELD_NUMBER = 1; + @SuppressWarnings("serial") + private volatile java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + @java.lang.Override + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int POSTEDITEM_FIELD_NUMBER = 2; + private int postedItem_ = 0; + /** + * int32 postedItem = 2; + * @return The postedItem. + */ + @java.lang.Override + public int getPostedItem() { + return postedItem_; + } + + public static final int AVATARNAME_FIELD_NUMBER = 3; + @SuppressWarnings("serial") + private volatile java.lang.Object avatarName_ = ""; + /** + * string avatarName = 3; + * @return The avatarName. + */ + @java.lang.Override + public java.lang.String getAvatarName() { + java.lang.Object ref = avatarName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarName_ = s; + return s; + } + } + /** + * string avatarName = 3; + * @return The bytes for avatarName. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvatarNameBytes() { + java.lang.Object ref = avatarName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int WAIT_FIELD_NUMBER = 4; + private double wait_ = 0D; + /** + * double wait = 4; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, handlerID_); + } + if (postedItem_ != 0) { + output.writeInt32(2, postedItem_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, avatarName_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + output.writeDouble(4, wait_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(handlerID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, handlerID_); + } + if (postedItem_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, postedItem_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, avatarName_); + } + if (java.lang.Double.doubleToRawLongBits(wait_) != 0) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, wait_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event.TwilightPostItem)) { + return super.equals(obj); + } + net.taehui.EventClass.Event.TwilightPostItem other = (net.taehui.EventClass.Event.TwilightPostItem) obj; + + if (!getHandlerID() + .equals(other.getHandlerID())) return false; + if (getPostedItem() + != other.getPostedItem()) return false; + if (!getAvatarName() + .equals(other.getAvatarName())) return false; + if (java.lang.Double.doubleToLongBits(getWait()) + != java.lang.Double.doubleToLongBits( + other.getWait())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + HANDLERID_FIELD_NUMBER; + hash = (53 * hash) + getHandlerID().hashCode(); + hash = (37 * hash) + POSTEDITEM_FIELD_NUMBER; + hash = (53 * hash) + getPostedItem(); + hash = (37 * hash) + AVATARNAME_FIELD_NUMBER; + hash = (53 * hash) + getAvatarName().hashCode(); + hash = (37 * hash) + WAIT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getWait())); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event.TwilightPostItem parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event.TwilightPostItem parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event.TwilightPostItem parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event.TwilightPostItem prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event.TwilightPostItem} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event.TwilightPostItem) + net.taehui.EventClass.Event.TwilightPostItemOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_TwilightPostItem_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_TwilightPostItem_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.TwilightPostItem.class, net.taehui.EventClass.Event.TwilightPostItem.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.TwilightPostItem.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + handlerID_ = ""; + postedItem_ = 0; + avatarName_ = ""; + wait_ = 0D; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_TwilightPostItem_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightPostItem getDefaultInstanceForType() { + return net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightPostItem build() { + net.taehui.EventClass.Event.TwilightPostItem result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightPostItem buildPartial() { + net.taehui.EventClass.Event.TwilightPostItem result = new net.taehui.EventClass.Event.TwilightPostItem(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event.TwilightPostItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.handlerID_ = handlerID_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.postedItem_ = postedItem_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.avatarName_ = avatarName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.wait_ = wait_; + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event.TwilightPostItem) { + return mergeFrom((net.taehui.EventClass.Event.TwilightPostItem)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event.TwilightPostItem other) { + if (other == net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance()) return this; + if (!other.getHandlerID().isEmpty()) { + handlerID_ = other.handlerID_; + bitField0_ |= 0x00000001; + onChanged(); + } + if (other.getPostedItem() != 0) { + setPostedItem(other.getPostedItem()); + } + if (!other.getAvatarName().isEmpty()) { + avatarName_ = other.avatarName_; + bitField0_ |= 0x00000004; + onChanged(); + } + if (other.getWait() != 0D) { + setWait(other.getWait()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + handlerID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + postedItem_ = input.readInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + avatarName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 33: { + wait_ = input.readDouble(); + bitField0_ |= 0x00000008; + break; + } // case 33 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private java.lang.Object handlerID_ = ""; + /** + * string handlerID = 1; + * @return The handlerID. + */ + public java.lang.String getHandlerID() { + java.lang.Object ref = handlerID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + handlerID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string handlerID = 1; + * @return The bytes for handlerID. + */ + public com.google.protobuf.ByteString + getHandlerIDBytes() { + java.lang.Object ref = handlerID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + handlerID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string handlerID = 1; + * @param value The handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @return This builder for chaining. + */ + public Builder clearHandlerID() { + handlerID_ = getDefaultInstance().getHandlerID(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * string handlerID = 1; + * @param value The bytes for handlerID to set. + * @return This builder for chaining. + */ + public Builder setHandlerIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + handlerID_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + + private int postedItem_ ; + /** + * int32 postedItem = 2; + * @return The postedItem. + */ + @java.lang.Override + public int getPostedItem() { + return postedItem_; + } + /** + * int32 postedItem = 2; + * @param value The postedItem to set. + * @return This builder for chaining. + */ + public Builder setPostedItem(int value) { + + postedItem_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * int32 postedItem = 2; + * @return This builder for chaining. + */ + public Builder clearPostedItem() { + bitField0_ = (bitField0_ & ~0x00000002); + postedItem_ = 0; + onChanged(); + return this; + } + + private java.lang.Object avatarName_ = ""; + /** + * string avatarName = 3; + * @return The avatarName. + */ + public java.lang.String getAvatarName() { + java.lang.Object ref = avatarName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string avatarName = 3; + * @return The bytes for avatarName. + */ + public com.google.protobuf.ByteString + getAvatarNameBytes() { + java.lang.Object ref = avatarName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string avatarName = 3; + * @param value The avatarName to set. + * @return This builder for chaining. + */ + public Builder setAvatarName( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avatarName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * string avatarName = 3; + * @return This builder for chaining. + */ + public Builder clearAvatarName() { + avatarName_ = getDefaultInstance().getAvatarName(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * string avatarName = 3; + * @param value The bytes for avatarName to set. + * @return This builder for chaining. + */ + public Builder setAvatarNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatarName_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + + private double wait_ ; + /** + * double wait = 4; + * @return The wait. + */ + @java.lang.Override + public double getWait() { + return wait_; + } + /** + * double wait = 4; + * @param value The wait to set. + * @return This builder for chaining. + */ + public Builder setWait(double value) { + + wait_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * double wait = 4; + * @return This builder for chaining. + */ + public Builder clearWait() { + bitField0_ = (bitField0_ & ~0x00000008); + wait_ = 0D; + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event.TwilightPostItem) + } + + // @@protoc_insertion_point(class_scope:Event.TwilightPostItem) + private static final net.taehui.EventClass.Event.TwilightPostItem DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event.TwilightPostItem(); + } + + public static net.taehui.EventClass.Event.TwilightPostItem getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TwilightPostItem parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event.TwilightPostItem getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private int fastTextCase_ = 0; + @SuppressWarnings("serial") + private java.lang.Object fastText_; + public enum FastTextCase + implements com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + QWILIGHTCALLNET(6), + TWILIGHTCALLNET(7), + QWILIGHTIOINPUT(8), + TWILIGHTIOINPUT(9), + QWILIGHTIOJUDGE(10), + TWILIGHTIOJUDGE(11), + QWILIGHTIOJUDGMENTMETER(12), + TWILIGHTIOJUDGMENTMETER(13), + QWILIGHTIONOTEVISIBILITY(14), + TWILIGHTIONOTEVISIBILITY(15), + QWILIGHTIOMULTIPLIER(16), + TWILIGHTIOMULTIPLIER(17), + QWILIGHTIOAUDIOMULTIPLIER(18), + TWILIGHTIOAUDIOMULTIPLIER(19), + TWILIGHTAUDIOINPUT(20), + QWILIGHTPOSTITEM(21), + TWILIGHTPOSTITEM(22), + FASTTEXT_NOT_SET(0); + private final int value; + private FastTextCase(int value) { + this.value = value; + } + /** + * @param value The number of the enum to look for. + * @return The enum associated with the given number. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FastTextCase valueOf(int value) { + return forNumber(value); + } + + public static FastTextCase forNumber(int value) { + switch (value) { + case 6: return QWILIGHTCALLNET; + case 7: return TWILIGHTCALLNET; + case 8: return QWILIGHTIOINPUT; + case 9: return TWILIGHTIOINPUT; + case 10: return QWILIGHTIOJUDGE; + case 11: return TWILIGHTIOJUDGE; + case 12: return QWILIGHTIOJUDGMENTMETER; + case 13: return TWILIGHTIOJUDGMENTMETER; + case 14: return QWILIGHTIONOTEVISIBILITY; + case 15: return TWILIGHTIONOTEVISIBILITY; + case 16: return QWILIGHTIOMULTIPLIER; + case 17: return TWILIGHTIOMULTIPLIER; + case 18: return QWILIGHTIOAUDIOMULTIPLIER; + case 19: return TWILIGHTIOAUDIOMULTIPLIER; + case 20: return TWILIGHTAUDIOINPUT; + case 21: return QWILIGHTPOSTITEM; + case 22: return TWILIGHTPOSTITEM; + case 0: return FASTTEXT_NOT_SET; + default: return null; + } + } + public int getNumber() { + return this.value; + } + }; + + public FastTextCase + getFastTextCase() { + return FastTextCase.forNumber( + fastTextCase_); + } + + public static final int MILLIS_FIELD_NUMBER = 1; + private long millis_ = 0L; + /** + * int64 millis = 1; + * @return The millis. + */ + @java.lang.Override + public long getMillis() { + return millis_; + } + + public static final int AVATARID_FIELD_NUMBER = 2; + @SuppressWarnings("serial") + private volatile java.lang.Object avatarID_ = ""; + /** + * string avatarID = 2; + * @return The avatarID. + */ + @java.lang.Override + public java.lang.String getAvatarID() { + java.lang.Object ref = avatarID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarID_ = s; + return s; + } + } + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getAvatarIDBytes() { + java.lang.Object ref = avatarID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EVENTID_FIELD_NUMBER = 3; + private int eventID_ = 0; + /** + * .Event.EventID eventID = 3; + * @return The enum numeric value on the wire for eventID. + */ + @java.lang.Override public int getEventIDValue() { + return eventID_; + } + /** + * .Event.EventID eventID = 3; + * @return The eventID. + */ + @java.lang.Override public net.taehui.EventClass.Event.EventID getEventID() { + net.taehui.EventClass.Event.EventID result = net.taehui.EventClass.Event.EventID.forNumber(eventID_); + return result == null ? net.taehui.EventClass.Event.EventID.UNRECOGNIZED : result; + } + + public static final int TEXT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; + /** + * string text = 4; + * @return The text. + */ + @java.lang.Override + public java.lang.String getText() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } + } + /** + * string text = 4; + * @return The bytes for text. + */ + @java.lang.Override + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_FIELD_NUMBER = 5; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.ProtobufList data_ = + emptyList(com.google.protobuf.ByteString.class); + /** + * repeated bytes data = 5; + * @return A list containing the data. + */ + @java.lang.Override + public java.util.List + getDataList() { + return data_; + } + /** + * repeated bytes data = 5; + * @return The count of data. + */ + public int getDataCount() { + return data_.size(); + } + /** + * repeated bytes data = 5; + * @param index The index of the element to return. + * @return The data at the given index. + */ + public com.google.protobuf.ByteString getData(int index) { + return data_.get(index); + } + + public static final int QWILIGHTCALLNET_FIELD_NUMBER = 6; + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + * @return Whether the qwilightCallNet field is set. + */ + @java.lang.Override + public boolean hasQwilightCallNet() { + return fastTextCase_ == 6; + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + * @return The qwilightCallNet. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightCallNet getQwilightCallNet() { + if (fastTextCase_ == 6) { + return (net.taehui.EventClass.Event.QwilightCallNet) fastText_; + } + return net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance(); + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightCallNetOrBuilder getQwilightCallNetOrBuilder() { + if (fastTextCase_ == 6) { + return (net.taehui.EventClass.Event.QwilightCallNet) fastText_; + } + return net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance(); + } + + public static final int TWILIGHTCALLNET_FIELD_NUMBER = 7; + /** + * .Event.TwilightCallNet twilightCallNet = 7; + * @return Whether the twilightCallNet field is set. + */ + @java.lang.Override + public boolean hasTwilightCallNet() { + return fastTextCase_ == 7; + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + * @return The twilightCallNet. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet getTwilightCallNet() { + if (fastTextCase_ == 7) { + return (net.taehui.EventClass.Event.TwilightCallNet) fastText_; + } + return net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance(); + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNetOrBuilder getTwilightCallNetOrBuilder() { + if (fastTextCase_ == 7) { + return (net.taehui.EventClass.Event.TwilightCallNet) fastText_; + } + return net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance(); + } + + public static final int QWILIGHTIOINPUT_FIELD_NUMBER = 8; + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + * @return Whether the qwilightIOInput field is set. + */ + @java.lang.Override + public boolean hasQwilightIOInput() { + return fastTextCase_ == 8; + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + * @return The qwilightIOInput. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOInput getQwilightIOInput() { + if (fastTextCase_ == 8) { + return (net.taehui.EventClass.Event.QwilightIOInput) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance(); + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOInputOrBuilder getQwilightIOInputOrBuilder() { + if (fastTextCase_ == 8) { + return (net.taehui.EventClass.Event.QwilightIOInput) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance(); + } + + public static final int TWILIGHTIOINPUT_FIELD_NUMBER = 9; + /** + * .Event.TwilightIOInput twilightIOInput = 9; + * @return Whether the twilightIOInput field is set. + */ + @java.lang.Override + public boolean hasTwilightIOInput() { + return fastTextCase_ == 9; + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + * @return The twilightIOInput. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOInput getTwilightIOInput() { + if (fastTextCase_ == 9) { + return (net.taehui.EventClass.Event.TwilightIOInput) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance(); + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOInputOrBuilder getTwilightIOInputOrBuilder() { + if (fastTextCase_ == 9) { + return (net.taehui.EventClass.Event.TwilightIOInput) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance(); + } + + public static final int QWILIGHTIOJUDGE_FIELD_NUMBER = 10; + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + * @return Whether the qwilightIOJudge field is set. + */ + @java.lang.Override + public boolean hasQwilightIOJudge() { + return fastTextCase_ == 10; + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + * @return The qwilightIOJudge. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudge getQwilightIOJudge() { + if (fastTextCase_ == 10) { + return (net.taehui.EventClass.Event.QwilightIOJudge) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance(); + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgeOrBuilder getQwilightIOJudgeOrBuilder() { + if (fastTextCase_ == 10) { + return (net.taehui.EventClass.Event.QwilightIOJudge) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance(); + } + + public static final int TWILIGHTIOJUDGE_FIELD_NUMBER = 11; + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + * @return Whether the twilightIOJudge field is set. + */ + @java.lang.Override + public boolean hasTwilightIOJudge() { + return fastTextCase_ == 11; + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + * @return The twilightIOJudge. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudge getTwilightIOJudge() { + if (fastTextCase_ == 11) { + return (net.taehui.EventClass.Event.TwilightIOJudge) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance(); + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgeOrBuilder getTwilightIOJudgeOrBuilder() { + if (fastTextCase_ == 11) { + return (net.taehui.EventClass.Event.TwilightIOJudge) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance(); + } + + public static final int QWILIGHTIOJUDGMENTMETER_FIELD_NUMBER = 12; + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + * @return Whether the qwilightIOJudgmentMeter field is set. + */ + @java.lang.Override + public boolean hasQwilightIOJudgmentMeter() { + return fastTextCase_ == 12; + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + * @return The qwilightIOJudgmentMeter. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgmentMeter getQwilightIOJudgmentMeter() { + if (fastTextCase_ == 12) { + return (net.taehui.EventClass.Event.QwilightIOJudgmentMeter) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance(); + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgmentMeterOrBuilder getQwilightIOJudgmentMeterOrBuilder() { + if (fastTextCase_ == 12) { + return (net.taehui.EventClass.Event.QwilightIOJudgmentMeter) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance(); + } + + public static final int TWILIGHTIOJUDGMENTMETER_FIELD_NUMBER = 13; + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + * @return Whether the twilightIOJudgmentMeter field is set. + */ + @java.lang.Override + public boolean hasTwilightIOJudgmentMeter() { + return fastTextCase_ == 13; + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + * @return The twilightIOJudgmentMeter. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgmentMeter getTwilightIOJudgmentMeter() { + if (fastTextCase_ == 13) { + return (net.taehui.EventClass.Event.TwilightIOJudgmentMeter) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance(); + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgmentMeterOrBuilder getTwilightIOJudgmentMeterOrBuilder() { + if (fastTextCase_ == 13) { + return (net.taehui.EventClass.Event.TwilightIOJudgmentMeter) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance(); + } + + public static final int QWILIGHTIONOTEVISIBILITY_FIELD_NUMBER = 14; + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + * @return Whether the qwilightIONoteVisibility field is set. + */ + @java.lang.Override + public boolean hasQwilightIONoteVisibility() { + return fastTextCase_ == 14; + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + * @return The qwilightIONoteVisibility. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIONoteVisibility getQwilightIONoteVisibility() { + if (fastTextCase_ == 14) { + return (net.taehui.EventClass.Event.QwilightIONoteVisibility) fastText_; + } + return net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance(); + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIONoteVisibilityOrBuilder getQwilightIONoteVisibilityOrBuilder() { + if (fastTextCase_ == 14) { + return (net.taehui.EventClass.Event.QwilightIONoteVisibility) fastText_; + } + return net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance(); + } + + public static final int TWILIGHTIONOTEVISIBILITY_FIELD_NUMBER = 15; + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + * @return Whether the twilightIONoteVisibility field is set. + */ + @java.lang.Override + public boolean hasTwilightIONoteVisibility() { + return fastTextCase_ == 15; + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + * @return The twilightIONoteVisibility. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIONoteVisibility getTwilightIONoteVisibility() { + if (fastTextCase_ == 15) { + return (net.taehui.EventClass.Event.TwilightIONoteVisibility) fastText_; + } + return net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance(); + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIONoteVisibilityOrBuilder getTwilightIONoteVisibilityOrBuilder() { + if (fastTextCase_ == 15) { + return (net.taehui.EventClass.Event.TwilightIONoteVisibility) fastText_; + } + return net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance(); + } + + public static final int QWILIGHTIOMULTIPLIER_FIELD_NUMBER = 16; + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + * @return Whether the qwilightIOMultiplier field is set. + */ + @java.lang.Override + public boolean hasQwilightIOMultiplier() { + return fastTextCase_ == 16; + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + * @return The qwilightIOMultiplier. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOMultiplier getQwilightIOMultiplier() { + if (fastTextCase_ == 16) { + return (net.taehui.EventClass.Event.QwilightIOMultiplier) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance(); + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOMultiplierOrBuilder getQwilightIOMultiplierOrBuilder() { + if (fastTextCase_ == 16) { + return (net.taehui.EventClass.Event.QwilightIOMultiplier) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance(); + } + + public static final int TWILIGHTIOMULTIPLIER_FIELD_NUMBER = 17; + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + * @return Whether the twilightIOMultiplier field is set. + */ + @java.lang.Override + public boolean hasTwilightIOMultiplier() { + return fastTextCase_ == 17; + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + * @return The twilightIOMultiplier. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOMultiplier getTwilightIOMultiplier() { + if (fastTextCase_ == 17) { + return (net.taehui.EventClass.Event.TwilightIOMultiplier) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance(); + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOMultiplierOrBuilder getTwilightIOMultiplierOrBuilder() { + if (fastTextCase_ == 17) { + return (net.taehui.EventClass.Event.TwilightIOMultiplier) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance(); + } + + public static final int QWILIGHTIOAUDIOMULTIPLIER_FIELD_NUMBER = 18; + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + * @return Whether the qwilightIOAudioMultiplier field is set. + */ + @java.lang.Override + public boolean hasQwilightIOAudioMultiplier() { + return fastTextCase_ == 18; + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + * @return The qwilightIOAudioMultiplier. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOAudioMultiplier getQwilightIOAudioMultiplier() { + if (fastTextCase_ == 18) { + return (net.taehui.EventClass.Event.QwilightIOAudioMultiplier) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance(); + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOAudioMultiplierOrBuilder getQwilightIOAudioMultiplierOrBuilder() { + if (fastTextCase_ == 18) { + return (net.taehui.EventClass.Event.QwilightIOAudioMultiplier) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance(); + } + + public static final int TWILIGHTIOAUDIOMULTIPLIER_FIELD_NUMBER = 19; + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + * @return Whether the twilightIOAudioMultiplier field is set. + */ + @java.lang.Override + public boolean hasTwilightIOAudioMultiplier() { + return fastTextCase_ == 19; + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + * @return The twilightIOAudioMultiplier. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOAudioMultiplier getTwilightIOAudioMultiplier() { + if (fastTextCase_ == 19) { + return (net.taehui.EventClass.Event.TwilightIOAudioMultiplier) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance(); + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOAudioMultiplierOrBuilder getTwilightIOAudioMultiplierOrBuilder() { + if (fastTextCase_ == 19) { + return (net.taehui.EventClass.Event.TwilightIOAudioMultiplier) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance(); + } + + public static final int TWILIGHTAUDIOINPUT_FIELD_NUMBER = 20; + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + * @return Whether the twilightAudioInput field is set. + */ + @java.lang.Override + public boolean hasTwilightAudioInput() { + return fastTextCase_ == 20; + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + * @return The twilightAudioInput. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightAudioInput getTwilightAudioInput() { + if (fastTextCase_ == 20) { + return (net.taehui.EventClass.Event.TwilightAudioInput) fastText_; + } + return net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance(); + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightAudioInputOrBuilder getTwilightAudioInputOrBuilder() { + if (fastTextCase_ == 20) { + return (net.taehui.EventClass.Event.TwilightAudioInput) fastText_; + } + return net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance(); + } + + public static final int QWILIGHTPOSTITEM_FIELD_NUMBER = 21; + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + * @return Whether the qwilightPostItem field is set. + */ + @java.lang.Override + public boolean hasQwilightPostItem() { + return fastTextCase_ == 21; + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + * @return The qwilightPostItem. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightPostItem getQwilightPostItem() { + if (fastTextCase_ == 21) { + return (net.taehui.EventClass.Event.QwilightPostItem) fastText_; + } + return net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance(); + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightPostItemOrBuilder getQwilightPostItemOrBuilder() { + if (fastTextCase_ == 21) { + return (net.taehui.EventClass.Event.QwilightPostItem) fastText_; + } + return net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance(); + } + + public static final int TWILIGHTPOSTITEM_FIELD_NUMBER = 22; + /** + * .Event.TwilightPostItem twilightPostItem = 22; + * @return Whether the twilightPostItem field is set. + */ + @java.lang.Override + public boolean hasTwilightPostItem() { + return fastTextCase_ == 22; + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + * @return The twilightPostItem. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightPostItem getTwilightPostItem() { + if (fastTextCase_ == 22) { + return (net.taehui.EventClass.Event.TwilightPostItem) fastText_; + } + return net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance(); + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightPostItemOrBuilder getTwilightPostItemOrBuilder() { + if (fastTextCase_ == 22) { + return (net.taehui.EventClass.Event.TwilightPostItem) fastText_; + } + return net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (millis_ != 0L) { + output.writeInt64(1, millis_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarID_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, avatarID_); + } + if (eventID_ != net.taehui.EventClass.Event.EventID.SIGN_IN.getNumber()) { + output.writeEnum(3, eventID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, text_); + } + for (int i = 0; i < data_.size(); i++) { + output.writeBytes(5, data_.get(i)); + } + if (fastTextCase_ == 6) { + output.writeMessage(6, (net.taehui.EventClass.Event.QwilightCallNet) fastText_); + } + if (fastTextCase_ == 7) { + output.writeMessage(7, (net.taehui.EventClass.Event.TwilightCallNet) fastText_); + } + if (fastTextCase_ == 8) { + output.writeMessage(8, (net.taehui.EventClass.Event.QwilightIOInput) fastText_); + } + if (fastTextCase_ == 9) { + output.writeMessage(9, (net.taehui.EventClass.Event.TwilightIOInput) fastText_); + } + if (fastTextCase_ == 10) { + output.writeMessage(10, (net.taehui.EventClass.Event.QwilightIOJudge) fastText_); + } + if (fastTextCase_ == 11) { + output.writeMessage(11, (net.taehui.EventClass.Event.TwilightIOJudge) fastText_); + } + if (fastTextCase_ == 12) { + output.writeMessage(12, (net.taehui.EventClass.Event.QwilightIOJudgmentMeter) fastText_); + } + if (fastTextCase_ == 13) { + output.writeMessage(13, (net.taehui.EventClass.Event.TwilightIOJudgmentMeter) fastText_); + } + if (fastTextCase_ == 14) { + output.writeMessage(14, (net.taehui.EventClass.Event.QwilightIONoteVisibility) fastText_); + } + if (fastTextCase_ == 15) { + output.writeMessage(15, (net.taehui.EventClass.Event.TwilightIONoteVisibility) fastText_); + } + if (fastTextCase_ == 16) { + output.writeMessage(16, (net.taehui.EventClass.Event.QwilightIOMultiplier) fastText_); + } + if (fastTextCase_ == 17) { + output.writeMessage(17, (net.taehui.EventClass.Event.TwilightIOMultiplier) fastText_); + } + if (fastTextCase_ == 18) { + output.writeMessage(18, (net.taehui.EventClass.Event.QwilightIOAudioMultiplier) fastText_); + } + if (fastTextCase_ == 19) { + output.writeMessage(19, (net.taehui.EventClass.Event.TwilightIOAudioMultiplier) fastText_); + } + if (fastTextCase_ == 20) { + output.writeMessage(20, (net.taehui.EventClass.Event.TwilightAudioInput) fastText_); + } + if (fastTextCase_ == 21) { + output.writeMessage(21, (net.taehui.EventClass.Event.QwilightPostItem) fastText_); + } + if (fastTextCase_ == 22) { + output.writeMessage(22, (net.taehui.EventClass.Event.TwilightPostItem) fastText_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (millis_ != 0L) { + size += com.google.protobuf.CodedOutputStream + .computeInt64Size(1, millis_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(avatarID_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, avatarID_); + } + if (eventID_ != net.taehui.EventClass.Event.EventID.SIGN_IN.getNumber()) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(3, eventID_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, text_); + } + { + int dataSize = 0; + for (int i = 0; i < data_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(data_.get(i)); + } + size += dataSize; + size += 1 * getDataList().size(); + } + if (fastTextCase_ == 6) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, (net.taehui.EventClass.Event.QwilightCallNet) fastText_); + } + if (fastTextCase_ == 7) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, (net.taehui.EventClass.Event.TwilightCallNet) fastText_); + } + if (fastTextCase_ == 8) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, (net.taehui.EventClass.Event.QwilightIOInput) fastText_); + } + if (fastTextCase_ == 9) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, (net.taehui.EventClass.Event.TwilightIOInput) fastText_); + } + if (fastTextCase_ == 10) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, (net.taehui.EventClass.Event.QwilightIOJudge) fastText_); + } + if (fastTextCase_ == 11) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, (net.taehui.EventClass.Event.TwilightIOJudge) fastText_); + } + if (fastTextCase_ == 12) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, (net.taehui.EventClass.Event.QwilightIOJudgmentMeter) fastText_); + } + if (fastTextCase_ == 13) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, (net.taehui.EventClass.Event.TwilightIOJudgmentMeter) fastText_); + } + if (fastTextCase_ == 14) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, (net.taehui.EventClass.Event.QwilightIONoteVisibility) fastText_); + } + if (fastTextCase_ == 15) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, (net.taehui.EventClass.Event.TwilightIONoteVisibility) fastText_); + } + if (fastTextCase_ == 16) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, (net.taehui.EventClass.Event.QwilightIOMultiplier) fastText_); + } + if (fastTextCase_ == 17) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, (net.taehui.EventClass.Event.TwilightIOMultiplier) fastText_); + } + if (fastTextCase_ == 18) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(18, (net.taehui.EventClass.Event.QwilightIOAudioMultiplier) fastText_); + } + if (fastTextCase_ == 19) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(19, (net.taehui.EventClass.Event.TwilightIOAudioMultiplier) fastText_); + } + if (fastTextCase_ == 20) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(20, (net.taehui.EventClass.Event.TwilightAudioInput) fastText_); + } + if (fastTextCase_ == 21) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(21, (net.taehui.EventClass.Event.QwilightPostItem) fastText_); + } + if (fastTextCase_ == 22) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(22, (net.taehui.EventClass.Event.TwilightPostItem) fastText_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof net.taehui.EventClass.Event)) { + return super.equals(obj); + } + net.taehui.EventClass.Event other = (net.taehui.EventClass.Event) obj; + + if (getMillis() + != other.getMillis()) return false; + if (!getAvatarID() + .equals(other.getAvatarID())) return false; + if (eventID_ != other.eventID_) return false; + if (!getText() + .equals(other.getText())) return false; + if (!getDataList() + .equals(other.getDataList())) return false; + if (!getFastTextCase().equals(other.getFastTextCase())) return false; + switch (fastTextCase_) { + case 6: + if (!getQwilightCallNet() + .equals(other.getQwilightCallNet())) return false; + break; + case 7: + if (!getTwilightCallNet() + .equals(other.getTwilightCallNet())) return false; + break; + case 8: + if (!getQwilightIOInput() + .equals(other.getQwilightIOInput())) return false; + break; + case 9: + if (!getTwilightIOInput() + .equals(other.getTwilightIOInput())) return false; + break; + case 10: + if (!getQwilightIOJudge() + .equals(other.getQwilightIOJudge())) return false; + break; + case 11: + if (!getTwilightIOJudge() + .equals(other.getTwilightIOJudge())) return false; + break; + case 12: + if (!getQwilightIOJudgmentMeter() + .equals(other.getQwilightIOJudgmentMeter())) return false; + break; + case 13: + if (!getTwilightIOJudgmentMeter() + .equals(other.getTwilightIOJudgmentMeter())) return false; + break; + case 14: + if (!getQwilightIONoteVisibility() + .equals(other.getQwilightIONoteVisibility())) return false; + break; + case 15: + if (!getTwilightIONoteVisibility() + .equals(other.getTwilightIONoteVisibility())) return false; + break; + case 16: + if (!getQwilightIOMultiplier() + .equals(other.getQwilightIOMultiplier())) return false; + break; + case 17: + if (!getTwilightIOMultiplier() + .equals(other.getTwilightIOMultiplier())) return false; + break; + case 18: + if (!getQwilightIOAudioMultiplier() + .equals(other.getQwilightIOAudioMultiplier())) return false; + break; + case 19: + if (!getTwilightIOAudioMultiplier() + .equals(other.getTwilightIOAudioMultiplier())) return false; + break; + case 20: + if (!getTwilightAudioInput() + .equals(other.getTwilightAudioInput())) return false; + break; + case 21: + if (!getQwilightPostItem() + .equals(other.getQwilightPostItem())) return false; + break; + case 22: + if (!getTwilightPostItem() + .equals(other.getTwilightPostItem())) return false; + break; + case 0: + default: + } + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + MILLIS_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong( + getMillis()); + hash = (37 * hash) + AVATARID_FIELD_NUMBER; + hash = (53 * hash) + getAvatarID().hashCode(); + hash = (37 * hash) + EVENTID_FIELD_NUMBER; + hash = (53 * hash) + eventID_; + hash = (37 * hash) + TEXT_FIELD_NUMBER; + hash = (53 * hash) + getText().hashCode(); + if (getDataCount() > 0) { + hash = (37 * hash) + DATA_FIELD_NUMBER; + hash = (53 * hash) + getDataList().hashCode(); + } + switch (fastTextCase_) { + case 6: + hash = (37 * hash) + QWILIGHTCALLNET_FIELD_NUMBER; + hash = (53 * hash) + getQwilightCallNet().hashCode(); + break; + case 7: + hash = (37 * hash) + TWILIGHTCALLNET_FIELD_NUMBER; + hash = (53 * hash) + getTwilightCallNet().hashCode(); + break; + case 8: + hash = (37 * hash) + QWILIGHTIOINPUT_FIELD_NUMBER; + hash = (53 * hash) + getQwilightIOInput().hashCode(); + break; + case 9: + hash = (37 * hash) + TWILIGHTIOINPUT_FIELD_NUMBER; + hash = (53 * hash) + getTwilightIOInput().hashCode(); + break; + case 10: + hash = (37 * hash) + QWILIGHTIOJUDGE_FIELD_NUMBER; + hash = (53 * hash) + getQwilightIOJudge().hashCode(); + break; + case 11: + hash = (37 * hash) + TWILIGHTIOJUDGE_FIELD_NUMBER; + hash = (53 * hash) + getTwilightIOJudge().hashCode(); + break; + case 12: + hash = (37 * hash) + QWILIGHTIOJUDGMENTMETER_FIELD_NUMBER; + hash = (53 * hash) + getQwilightIOJudgmentMeter().hashCode(); + break; + case 13: + hash = (37 * hash) + TWILIGHTIOJUDGMENTMETER_FIELD_NUMBER; + hash = (53 * hash) + getTwilightIOJudgmentMeter().hashCode(); + break; + case 14: + hash = (37 * hash) + QWILIGHTIONOTEVISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getQwilightIONoteVisibility().hashCode(); + break; + case 15: + hash = (37 * hash) + TWILIGHTIONOTEVISIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getTwilightIONoteVisibility().hashCode(); + break; + case 16: + hash = (37 * hash) + QWILIGHTIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + getQwilightIOMultiplier().hashCode(); + break; + case 17: + hash = (37 * hash) + TWILIGHTIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + getTwilightIOMultiplier().hashCode(); + break; + case 18: + hash = (37 * hash) + QWILIGHTIOAUDIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + getQwilightIOAudioMultiplier().hashCode(); + break; + case 19: + hash = (37 * hash) + TWILIGHTIOAUDIOMULTIPLIER_FIELD_NUMBER; + hash = (53 * hash) + getTwilightIOAudioMultiplier().hashCode(); + break; + case 20: + hash = (37 * hash) + TWILIGHTAUDIOINPUT_FIELD_NUMBER; + hash = (53 * hash) + getTwilightAudioInput().hashCode(); + break; + case 21: + hash = (37 * hash) + QWILIGHTPOSTITEM_FIELD_NUMBER; + hash = (53 * hash) + getQwilightPostItem().hashCode(); + break; + case 22: + hash = (37 * hash) + TWILIGHTPOSTITEM_FIELD_NUMBER; + hash = (53 * hash) + getTwilightPostItem().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static net.taehui.EventClass.Event parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static net.taehui.EventClass.Event parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static net.taehui.EventClass.Event parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public static net.taehui.EventClass.Event parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + + public static net.taehui.EventClass.Event parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static net.taehui.EventClass.Event parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static net.taehui.EventClass.Event parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(net.taehui.EventClass.Event prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Event} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:Event) + net.taehui.EventClass.EventOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return net.taehui.EventClass.internal_static_Event_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return net.taehui.EventClass.internal_static_Event_fieldAccessorTable + .ensureFieldAccessorsInitialized( + net.taehui.EventClass.Event.class, net.taehui.EventClass.Event.Builder.class); + } + + // Construct using net.taehui.EventClass.Event.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + bitField0_ = 0; + millis_ = 0L; + avatarID_ = ""; + eventID_ = 0; + text_ = ""; + data_ = emptyList(com.google.protobuf.ByteString.class); + if (qwilightCallNetBuilder_ != null) { + qwilightCallNetBuilder_.clear(); + } + if (twilightCallNetBuilder_ != null) { + twilightCallNetBuilder_.clear(); + } + if (qwilightIOInputBuilder_ != null) { + qwilightIOInputBuilder_.clear(); + } + if (twilightIOInputBuilder_ != null) { + twilightIOInputBuilder_.clear(); + } + if (qwilightIOJudgeBuilder_ != null) { + qwilightIOJudgeBuilder_.clear(); + } + if (twilightIOJudgeBuilder_ != null) { + twilightIOJudgeBuilder_.clear(); + } + if (qwilightIOJudgmentMeterBuilder_ != null) { + qwilightIOJudgmentMeterBuilder_.clear(); + } + if (twilightIOJudgmentMeterBuilder_ != null) { + twilightIOJudgmentMeterBuilder_.clear(); + } + if (qwilightIONoteVisibilityBuilder_ != null) { + qwilightIONoteVisibilityBuilder_.clear(); + } + if (twilightIONoteVisibilityBuilder_ != null) { + twilightIONoteVisibilityBuilder_.clear(); + } + if (qwilightIOMultiplierBuilder_ != null) { + qwilightIOMultiplierBuilder_.clear(); + } + if (twilightIOMultiplierBuilder_ != null) { + twilightIOMultiplierBuilder_.clear(); + } + if (qwilightIOAudioMultiplierBuilder_ != null) { + qwilightIOAudioMultiplierBuilder_.clear(); + } + if (twilightIOAudioMultiplierBuilder_ != null) { + twilightIOAudioMultiplierBuilder_.clear(); + } + if (twilightAudioInputBuilder_ != null) { + twilightAudioInputBuilder_.clear(); + } + if (qwilightPostItemBuilder_ != null) { + qwilightPostItemBuilder_.clear(); + } + if (twilightPostItemBuilder_ != null) { + twilightPostItemBuilder_.clear(); + } + fastTextCase_ = 0; + fastText_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return net.taehui.EventClass.internal_static_Event_descriptor; + } + + @java.lang.Override + public net.taehui.EventClass.Event getDefaultInstanceForType() { + return net.taehui.EventClass.Event.getDefaultInstance(); + } + + @java.lang.Override + public net.taehui.EventClass.Event build() { + net.taehui.EventClass.Event result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public net.taehui.EventClass.Event buildPartial() { + net.taehui.EventClass.Event result = new net.taehui.EventClass.Event(this); + if (bitField0_ != 0) { buildPartial0(result); } + buildPartialOneofs(result); + onBuilt(); + return result; + } + + private void buildPartial0(net.taehui.EventClass.Event result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.millis_ = millis_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.avatarID_ = avatarID_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.eventID_ = eventID_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.text_ = text_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + data_.makeImmutable(); + result.data_ = data_; + } + } + + private void buildPartialOneofs(net.taehui.EventClass.Event result) { + result.fastTextCase_ = fastTextCase_; + result.fastText_ = this.fastText_; + if (fastTextCase_ == 6 && + qwilightCallNetBuilder_ != null) { + result.fastText_ = qwilightCallNetBuilder_.build(); + } + if (fastTextCase_ == 7 && + twilightCallNetBuilder_ != null) { + result.fastText_ = twilightCallNetBuilder_.build(); + } + if (fastTextCase_ == 8 && + qwilightIOInputBuilder_ != null) { + result.fastText_ = qwilightIOInputBuilder_.build(); + } + if (fastTextCase_ == 9 && + twilightIOInputBuilder_ != null) { + result.fastText_ = twilightIOInputBuilder_.build(); + } + if (fastTextCase_ == 10 && + qwilightIOJudgeBuilder_ != null) { + result.fastText_ = qwilightIOJudgeBuilder_.build(); + } + if (fastTextCase_ == 11 && + twilightIOJudgeBuilder_ != null) { + result.fastText_ = twilightIOJudgeBuilder_.build(); + } + if (fastTextCase_ == 12 && + qwilightIOJudgmentMeterBuilder_ != null) { + result.fastText_ = qwilightIOJudgmentMeterBuilder_.build(); + } + if (fastTextCase_ == 13 && + twilightIOJudgmentMeterBuilder_ != null) { + result.fastText_ = twilightIOJudgmentMeterBuilder_.build(); + } + if (fastTextCase_ == 14 && + qwilightIONoteVisibilityBuilder_ != null) { + result.fastText_ = qwilightIONoteVisibilityBuilder_.build(); + } + if (fastTextCase_ == 15 && + twilightIONoteVisibilityBuilder_ != null) { + result.fastText_ = twilightIONoteVisibilityBuilder_.build(); + } + if (fastTextCase_ == 16 && + qwilightIOMultiplierBuilder_ != null) { + result.fastText_ = qwilightIOMultiplierBuilder_.build(); + } + if (fastTextCase_ == 17 && + twilightIOMultiplierBuilder_ != null) { + result.fastText_ = twilightIOMultiplierBuilder_.build(); + } + if (fastTextCase_ == 18 && + qwilightIOAudioMultiplierBuilder_ != null) { + result.fastText_ = qwilightIOAudioMultiplierBuilder_.build(); + } + if (fastTextCase_ == 19 && + twilightIOAudioMultiplierBuilder_ != null) { + result.fastText_ = twilightIOAudioMultiplierBuilder_.build(); + } + if (fastTextCase_ == 20 && + twilightAudioInputBuilder_ != null) { + result.fastText_ = twilightAudioInputBuilder_.build(); + } + if (fastTextCase_ == 21 && + qwilightPostItemBuilder_ != null) { + result.fastText_ = qwilightPostItemBuilder_.build(); + } + if (fastTextCase_ == 22 && + twilightPostItemBuilder_ != null) { + result.fastText_ = twilightPostItemBuilder_.build(); + } + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof net.taehui.EventClass.Event) { + return mergeFrom((net.taehui.EventClass.Event)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(net.taehui.EventClass.Event other) { + if (other == net.taehui.EventClass.Event.getDefaultInstance()) return this; + if (other.getMillis() != 0L) { + setMillis(other.getMillis()); + } + if (!other.getAvatarID().isEmpty()) { + avatarID_ = other.avatarID_; + bitField0_ |= 0x00000002; + onChanged(); + } + if (other.eventID_ != 0) { + setEventIDValue(other.getEventIDValue()); + } + if (!other.getText().isEmpty()) { + text_ = other.text_; + bitField0_ |= 0x00000008; + onChanged(); + } + if (!other.data_.isEmpty()) { + if (data_.isEmpty()) { + data_ = other.data_; + data_.makeImmutable(); + bitField0_ |= 0x00000010; + } else { + ensureDataIsMutable(); + data_.addAll(other.data_); + } + onChanged(); + } + switch (other.getFastTextCase()) { + case QWILIGHTCALLNET: { + mergeQwilightCallNet(other.getQwilightCallNet()); + break; + } + case TWILIGHTCALLNET: { + mergeTwilightCallNet(other.getTwilightCallNet()); + break; + } + case QWILIGHTIOINPUT: { + mergeQwilightIOInput(other.getQwilightIOInput()); + break; + } + case TWILIGHTIOINPUT: { + mergeTwilightIOInput(other.getTwilightIOInput()); + break; + } + case QWILIGHTIOJUDGE: { + mergeQwilightIOJudge(other.getQwilightIOJudge()); + break; + } + case TWILIGHTIOJUDGE: { + mergeTwilightIOJudge(other.getTwilightIOJudge()); + break; + } + case QWILIGHTIOJUDGMENTMETER: { + mergeQwilightIOJudgmentMeter(other.getQwilightIOJudgmentMeter()); + break; + } + case TWILIGHTIOJUDGMENTMETER: { + mergeTwilightIOJudgmentMeter(other.getTwilightIOJudgmentMeter()); + break; + } + case QWILIGHTIONOTEVISIBILITY: { + mergeQwilightIONoteVisibility(other.getQwilightIONoteVisibility()); + break; + } + case TWILIGHTIONOTEVISIBILITY: { + mergeTwilightIONoteVisibility(other.getTwilightIONoteVisibility()); + break; + } + case QWILIGHTIOMULTIPLIER: { + mergeQwilightIOMultiplier(other.getQwilightIOMultiplier()); + break; + } + case TWILIGHTIOMULTIPLIER: { + mergeTwilightIOMultiplier(other.getTwilightIOMultiplier()); + break; + } + case QWILIGHTIOAUDIOMULTIPLIER: { + mergeQwilightIOAudioMultiplier(other.getQwilightIOAudioMultiplier()); + break; + } + case TWILIGHTIOAUDIOMULTIPLIER: { + mergeTwilightIOAudioMultiplier(other.getTwilightIOAudioMultiplier()); + break; + } + case TWILIGHTAUDIOINPUT: { + mergeTwilightAudioInput(other.getTwilightAudioInput()); + break; + } + case QWILIGHTPOSTITEM: { + mergeQwilightPostItem(other.getQwilightPostItem()); + break; + } + case TWILIGHTPOSTITEM: { + mergeTwilightPostItem(other.getTwilightPostItem()); + break; + } + case FASTTEXT_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + millis_ = input.readInt64(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + avatarID_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + eventID_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + com.google.protobuf.ByteString v = input.readBytes(); + ensureDataIsMutable(); + data_.add(v); + break; + } // case 42 + case 50: { + input.readMessage( + getQwilightCallNetFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 6; + break; + } // case 50 + case 58: { + input.readMessage( + getTwilightCallNetFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 7; + break; + } // case 58 + case 66: { + input.readMessage( + getQwilightIOInputFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 8; + break; + } // case 66 + case 74: { + input.readMessage( + getTwilightIOInputFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 9; + break; + } // case 74 + case 82: { + input.readMessage( + getQwilightIOJudgeFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 10; + break; + } // case 82 + case 90: { + input.readMessage( + getTwilightIOJudgeFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 11; + break; + } // case 90 + case 98: { + input.readMessage( + getQwilightIOJudgmentMeterFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 12; + break; + } // case 98 + case 106: { + input.readMessage( + getTwilightIOJudgmentMeterFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 13; + break; + } // case 106 + case 114: { + input.readMessage( + getQwilightIONoteVisibilityFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 14; + break; + } // case 114 + case 122: { + input.readMessage( + getTwilightIONoteVisibilityFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 15; + break; + } // case 122 + case 130: { + input.readMessage( + getQwilightIOMultiplierFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 16; + break; + } // case 130 + case 138: { + input.readMessage( + getTwilightIOMultiplierFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 17; + break; + } // case 138 + case 146: { + input.readMessage( + getQwilightIOAudioMultiplierFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 18; + break; + } // case 146 + case 154: { + input.readMessage( + getTwilightIOAudioMultiplierFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 19; + break; + } // case 154 + case 162: { + input.readMessage( + getTwilightAudioInputFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 20; + break; + } // case 162 + case 170: { + input.readMessage( + getQwilightPostItemFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 21; + break; + } // case 170 + case 178: { + input.readMessage( + getTwilightPostItemFieldBuilder().getBuilder(), + extensionRegistry); + fastTextCase_ = 22; + break; + } // case 178 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int fastTextCase_ = 0; + private java.lang.Object fastText_; + public FastTextCase + getFastTextCase() { + return FastTextCase.forNumber( + fastTextCase_); + } + + public Builder clearFastText() { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private long millis_ ; + /** + * int64 millis = 1; + * @return The millis. + */ + @java.lang.Override + public long getMillis() { + return millis_; + } + /** + * int64 millis = 1; + * @param value The millis to set. + * @return This builder for chaining. + */ + public Builder setMillis(long value) { + + millis_ = value; + bitField0_ |= 0x00000001; + onChanged(); + return this; + } + /** + * int64 millis = 1; + * @return This builder for chaining. + */ + public Builder clearMillis() { + bitField0_ = (bitField0_ & ~0x00000001); + millis_ = 0L; + onChanged(); + return this; + } + + private java.lang.Object avatarID_ = ""; + /** + * string avatarID = 2; + * @return The avatarID. + */ + public java.lang.String getAvatarID() { + java.lang.Object ref = avatarID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + avatarID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string avatarID = 2; + * @return The bytes for avatarID. + */ + public com.google.protobuf.ByteString + getAvatarIDBytes() { + java.lang.Object ref = avatarID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + avatarID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string avatarID = 2; + * @param value The avatarID to set. + * @return This builder for chaining. + */ + public Builder setAvatarID( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + avatarID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + /** + * string avatarID = 2; + * @return This builder for chaining. + */ + public Builder clearAvatarID() { + avatarID_ = getDefaultInstance().getAvatarID(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * string avatarID = 2; + * @param value The bytes for avatarID to set. + * @return This builder for chaining. + */ + public Builder setAvatarIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + avatarID_ = value; + bitField0_ |= 0x00000002; + onChanged(); + return this; + } + + private int eventID_ = 0; + /** + * .Event.EventID eventID = 3; + * @return The enum numeric value on the wire for eventID. + */ + @java.lang.Override public int getEventIDValue() { + return eventID_; + } + /** + * .Event.EventID eventID = 3; + * @param value The enum numeric value on the wire for eventID to set. + * @return This builder for chaining. + */ + public Builder setEventIDValue(int value) { + eventID_ = value; + bitField0_ |= 0x00000004; + onChanged(); + return this; + } + /** + * .Event.EventID eventID = 3; + * @return The eventID. + */ + @java.lang.Override + public net.taehui.EventClass.Event.EventID getEventID() { + net.taehui.EventClass.Event.EventID result = net.taehui.EventClass.Event.EventID.forNumber(eventID_); + return result == null ? net.taehui.EventClass.Event.EventID.UNRECOGNIZED : result; + } + /** + * .Event.EventID eventID = 3; + * @param value The eventID to set. + * @return This builder for chaining. + */ + public Builder setEventID(net.taehui.EventClass.Event.EventID value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + eventID_ = value.getNumber(); + onChanged(); + return this; + } + /** + * .Event.EventID eventID = 3; + * @return This builder for chaining. + */ + public Builder clearEventID() { + bitField0_ = (bitField0_ & ~0x00000004); + eventID_ = 0; + onChanged(); + return this; + } + + private java.lang.Object text_ = ""; + /** + * string text = 4; + * @return The text. + */ + public java.lang.String getText() { + java.lang.Object ref = text_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + text_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * string text = 4; + * @return The bytes for text. + */ + public com.google.protobuf.ByteString + getTextBytes() { + java.lang.Object ref = text_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + text_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * string text = 4; + * @param value The text to set. + * @return This builder for chaining. + */ + public Builder setText( + java.lang.String value) { + if (value == null) { throw new NullPointerException(); } + text_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + /** + * string text = 4; + * @return This builder for chaining. + */ + public Builder clearText() { + text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * string text = 4; + * @param value The bytes for text to set. + * @return This builder for chaining. + */ + public Builder setTextBytes( + com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); + text_ = value; + bitField0_ |= 0x00000008; + onChanged(); + return this; + } + + private com.google.protobuf.Internal.ProtobufList data_ = emptyList(com.google.protobuf.ByteString.class); + private void ensureDataIsMutable() { + if (!data_.isModifiable()) { + data_ = makeMutableCopy(data_); + } + bitField0_ |= 0x00000010; + } + /** + * repeated bytes data = 5; + * @return A list containing the data. + */ + public java.util.List + getDataList() { + data_.makeImmutable(); + return data_; + } + /** + * repeated bytes data = 5; + * @return The count of data. + */ + public int getDataCount() { + return data_.size(); + } + /** + * repeated bytes data = 5; + * @param index The index of the element to return. + * @return The data at the given index. + */ + public com.google.protobuf.ByteString getData(int index) { + return data_.get(index); + } + /** + * repeated bytes data = 5; + * @param index The index to set the value at. + * @param value The data to set. + * @return This builder for chaining. + */ + public Builder setData( + int index, com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + ensureDataIsMutable(); + data_.set(index, value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated bytes data = 5; + * @param value The data to add. + * @return This builder for chaining. + */ + public Builder addData(com.google.protobuf.ByteString value) { + if (value == null) { throw new NullPointerException(); } + ensureDataIsMutable(); + data_.add(value); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated bytes data = 5; + * @param values The data to add. + * @return This builder for chaining. + */ + public Builder addAllData( + java.lang.Iterable values) { + ensureDataIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, data_); + bitField0_ |= 0x00000010; + onChanged(); + return this; + } + /** + * repeated bytes data = 5; + * @return This builder for chaining. + */ + public Builder clearData() { + data_ = emptyList(com.google.protobuf.ByteString.class); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightCallNet, net.taehui.EventClass.Event.QwilightCallNet.Builder, net.taehui.EventClass.Event.QwilightCallNetOrBuilder> qwilightCallNetBuilder_; + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + * @return Whether the qwilightCallNet field is set. + */ + @java.lang.Override + public boolean hasQwilightCallNet() { + return fastTextCase_ == 6; + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + * @return The qwilightCallNet. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightCallNet getQwilightCallNet() { + if (qwilightCallNetBuilder_ == null) { + if (fastTextCase_ == 6) { + return (net.taehui.EventClass.Event.QwilightCallNet) fastText_; + } + return net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance(); + } else { + if (fastTextCase_ == 6) { + return qwilightCallNetBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance(); + } + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + public Builder setQwilightCallNet(net.taehui.EventClass.Event.QwilightCallNet value) { + if (qwilightCallNetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + qwilightCallNetBuilder_.setMessage(value); + } + fastTextCase_ = 6; + return this; + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + public Builder setQwilightCallNet( + net.taehui.EventClass.Event.QwilightCallNet.Builder builderForValue) { + if (qwilightCallNetBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + qwilightCallNetBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 6; + return this; + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + public Builder mergeQwilightCallNet(net.taehui.EventClass.Event.QwilightCallNet value) { + if (qwilightCallNetBuilder_ == null) { + if (fastTextCase_ == 6 && + fastText_ != net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.QwilightCallNet.newBuilder((net.taehui.EventClass.Event.QwilightCallNet) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 6) { + qwilightCallNetBuilder_.mergeFrom(value); + } else { + qwilightCallNetBuilder_.setMessage(value); + } + } + fastTextCase_ = 6; + return this; + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + public Builder clearQwilightCallNet() { + if (qwilightCallNetBuilder_ == null) { + if (fastTextCase_ == 6) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 6) { + fastTextCase_ = 0; + fastText_ = null; + } + qwilightCallNetBuilder_.clear(); + } + return this; + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + public net.taehui.EventClass.Event.QwilightCallNet.Builder getQwilightCallNetBuilder() { + return getQwilightCallNetFieldBuilder().getBuilder(); + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightCallNetOrBuilder getQwilightCallNetOrBuilder() { + if ((fastTextCase_ == 6) && (qwilightCallNetBuilder_ != null)) { + return qwilightCallNetBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 6) { + return (net.taehui.EventClass.Event.QwilightCallNet) fastText_; + } + return net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance(); + } + } + /** + * .Event.QwilightCallNet qwilightCallNet = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightCallNet, net.taehui.EventClass.Event.QwilightCallNet.Builder, net.taehui.EventClass.Event.QwilightCallNetOrBuilder> + getQwilightCallNetFieldBuilder() { + if (qwilightCallNetBuilder_ == null) { + if (!(fastTextCase_ == 6)) { + fastText_ = net.taehui.EventClass.Event.QwilightCallNet.getDefaultInstance(); + } + qwilightCallNetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightCallNet, net.taehui.EventClass.Event.QwilightCallNet.Builder, net.taehui.EventClass.Event.QwilightCallNetOrBuilder>( + (net.taehui.EventClass.Event.QwilightCallNet) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 6; + onChanged(); + return qwilightCallNetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightCallNet, net.taehui.EventClass.Event.TwilightCallNet.Builder, net.taehui.EventClass.Event.TwilightCallNetOrBuilder> twilightCallNetBuilder_; + /** + * .Event.TwilightCallNet twilightCallNet = 7; + * @return Whether the twilightCallNet field is set. + */ + @java.lang.Override + public boolean hasTwilightCallNet() { + return fastTextCase_ == 7; + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + * @return The twilightCallNet. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNet getTwilightCallNet() { + if (twilightCallNetBuilder_ == null) { + if (fastTextCase_ == 7) { + return (net.taehui.EventClass.Event.TwilightCallNet) fastText_; + } + return net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance(); + } else { + if (fastTextCase_ == 7) { + return twilightCallNetBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance(); + } + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + public Builder setTwilightCallNet(net.taehui.EventClass.Event.TwilightCallNet value) { + if (twilightCallNetBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightCallNetBuilder_.setMessage(value); + } + fastTextCase_ = 7; + return this; + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + public Builder setTwilightCallNet( + net.taehui.EventClass.Event.TwilightCallNet.Builder builderForValue) { + if (twilightCallNetBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightCallNetBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 7; + return this; + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + public Builder mergeTwilightCallNet(net.taehui.EventClass.Event.TwilightCallNet value) { + if (twilightCallNetBuilder_ == null) { + if (fastTextCase_ == 7 && + fastText_ != net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightCallNet.newBuilder((net.taehui.EventClass.Event.TwilightCallNet) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 7) { + twilightCallNetBuilder_.mergeFrom(value); + } else { + twilightCallNetBuilder_.setMessage(value); + } + } + fastTextCase_ = 7; + return this; + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + public Builder clearTwilightCallNet() { + if (twilightCallNetBuilder_ == null) { + if (fastTextCase_ == 7) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 7) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightCallNetBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + public net.taehui.EventClass.Event.TwilightCallNet.Builder getTwilightCallNetBuilder() { + return getTwilightCallNetFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightCallNetOrBuilder getTwilightCallNetOrBuilder() { + if ((fastTextCase_ == 7) && (twilightCallNetBuilder_ != null)) { + return twilightCallNetBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 7) { + return (net.taehui.EventClass.Event.TwilightCallNet) fastText_; + } + return net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance(); + } + } + /** + * .Event.TwilightCallNet twilightCallNet = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightCallNet, net.taehui.EventClass.Event.TwilightCallNet.Builder, net.taehui.EventClass.Event.TwilightCallNetOrBuilder> + getTwilightCallNetFieldBuilder() { + if (twilightCallNetBuilder_ == null) { + if (!(fastTextCase_ == 7)) { + fastText_ = net.taehui.EventClass.Event.TwilightCallNet.getDefaultInstance(); + } + twilightCallNetBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightCallNet, net.taehui.EventClass.Event.TwilightCallNet.Builder, net.taehui.EventClass.Event.TwilightCallNetOrBuilder>( + (net.taehui.EventClass.Event.TwilightCallNet) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 7; + onChanged(); + return twilightCallNetBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOInput, net.taehui.EventClass.Event.QwilightIOInput.Builder, net.taehui.EventClass.Event.QwilightIOInputOrBuilder> qwilightIOInputBuilder_; + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + * @return Whether the qwilightIOInput field is set. + */ + @java.lang.Override + public boolean hasQwilightIOInput() { + return fastTextCase_ == 8; + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + * @return The qwilightIOInput. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOInput getQwilightIOInput() { + if (qwilightIOInputBuilder_ == null) { + if (fastTextCase_ == 8) { + return (net.taehui.EventClass.Event.QwilightIOInput) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance(); + } else { + if (fastTextCase_ == 8) { + return qwilightIOInputBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + public Builder setQwilightIOInput(net.taehui.EventClass.Event.QwilightIOInput value) { + if (qwilightIOInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + qwilightIOInputBuilder_.setMessage(value); + } + fastTextCase_ = 8; + return this; + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + public Builder setQwilightIOInput( + net.taehui.EventClass.Event.QwilightIOInput.Builder builderForValue) { + if (qwilightIOInputBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + qwilightIOInputBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 8; + return this; + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + public Builder mergeQwilightIOInput(net.taehui.EventClass.Event.QwilightIOInput value) { + if (qwilightIOInputBuilder_ == null) { + if (fastTextCase_ == 8 && + fastText_ != net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.QwilightIOInput.newBuilder((net.taehui.EventClass.Event.QwilightIOInput) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 8) { + qwilightIOInputBuilder_.mergeFrom(value); + } else { + qwilightIOInputBuilder_.setMessage(value); + } + } + fastTextCase_ = 8; + return this; + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + public Builder clearQwilightIOInput() { + if (qwilightIOInputBuilder_ == null) { + if (fastTextCase_ == 8) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 8) { + fastTextCase_ = 0; + fastText_ = null; + } + qwilightIOInputBuilder_.clear(); + } + return this; + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + public net.taehui.EventClass.Event.QwilightIOInput.Builder getQwilightIOInputBuilder() { + return getQwilightIOInputFieldBuilder().getBuilder(); + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOInputOrBuilder getQwilightIOInputOrBuilder() { + if ((fastTextCase_ == 8) && (qwilightIOInputBuilder_ != null)) { + return qwilightIOInputBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 8) { + return (net.taehui.EventClass.Event.QwilightIOInput) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOInput qwilightIOInput = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOInput, net.taehui.EventClass.Event.QwilightIOInput.Builder, net.taehui.EventClass.Event.QwilightIOInputOrBuilder> + getQwilightIOInputFieldBuilder() { + if (qwilightIOInputBuilder_ == null) { + if (!(fastTextCase_ == 8)) { + fastText_ = net.taehui.EventClass.Event.QwilightIOInput.getDefaultInstance(); + } + qwilightIOInputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOInput, net.taehui.EventClass.Event.QwilightIOInput.Builder, net.taehui.EventClass.Event.QwilightIOInputOrBuilder>( + (net.taehui.EventClass.Event.QwilightIOInput) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 8; + onChanged(); + return qwilightIOInputBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOInput, net.taehui.EventClass.Event.TwilightIOInput.Builder, net.taehui.EventClass.Event.TwilightIOInputOrBuilder> twilightIOInputBuilder_; + /** + * .Event.TwilightIOInput twilightIOInput = 9; + * @return Whether the twilightIOInput field is set. + */ + @java.lang.Override + public boolean hasTwilightIOInput() { + return fastTextCase_ == 9; + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + * @return The twilightIOInput. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOInput getTwilightIOInput() { + if (twilightIOInputBuilder_ == null) { + if (fastTextCase_ == 9) { + return (net.taehui.EventClass.Event.TwilightIOInput) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance(); + } else { + if (fastTextCase_ == 9) { + return twilightIOInputBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + public Builder setTwilightIOInput(net.taehui.EventClass.Event.TwilightIOInput value) { + if (twilightIOInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightIOInputBuilder_.setMessage(value); + } + fastTextCase_ = 9; + return this; + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + public Builder setTwilightIOInput( + net.taehui.EventClass.Event.TwilightIOInput.Builder builderForValue) { + if (twilightIOInputBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightIOInputBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 9; + return this; + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + public Builder mergeTwilightIOInput(net.taehui.EventClass.Event.TwilightIOInput value) { + if (twilightIOInputBuilder_ == null) { + if (fastTextCase_ == 9 && + fastText_ != net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightIOInput.newBuilder((net.taehui.EventClass.Event.TwilightIOInput) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 9) { + twilightIOInputBuilder_.mergeFrom(value); + } else { + twilightIOInputBuilder_.setMessage(value); + } + } + fastTextCase_ = 9; + return this; + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + public Builder clearTwilightIOInput() { + if (twilightIOInputBuilder_ == null) { + if (fastTextCase_ == 9) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 9) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightIOInputBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + public net.taehui.EventClass.Event.TwilightIOInput.Builder getTwilightIOInputBuilder() { + return getTwilightIOInputFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOInputOrBuilder getTwilightIOInputOrBuilder() { + if ((fastTextCase_ == 9) && (twilightIOInputBuilder_ != null)) { + return twilightIOInputBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 9) { + return (net.taehui.EventClass.Event.TwilightIOInput) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOInput twilightIOInput = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOInput, net.taehui.EventClass.Event.TwilightIOInput.Builder, net.taehui.EventClass.Event.TwilightIOInputOrBuilder> + getTwilightIOInputFieldBuilder() { + if (twilightIOInputBuilder_ == null) { + if (!(fastTextCase_ == 9)) { + fastText_ = net.taehui.EventClass.Event.TwilightIOInput.getDefaultInstance(); + } + twilightIOInputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOInput, net.taehui.EventClass.Event.TwilightIOInput.Builder, net.taehui.EventClass.Event.TwilightIOInputOrBuilder>( + (net.taehui.EventClass.Event.TwilightIOInput) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 9; + onChanged(); + return twilightIOInputBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOJudge, net.taehui.EventClass.Event.QwilightIOJudge.Builder, net.taehui.EventClass.Event.QwilightIOJudgeOrBuilder> qwilightIOJudgeBuilder_; + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + * @return Whether the qwilightIOJudge field is set. + */ + @java.lang.Override + public boolean hasQwilightIOJudge() { + return fastTextCase_ == 10; + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + * @return The qwilightIOJudge. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudge getQwilightIOJudge() { + if (qwilightIOJudgeBuilder_ == null) { + if (fastTextCase_ == 10) { + return (net.taehui.EventClass.Event.QwilightIOJudge) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance(); + } else { + if (fastTextCase_ == 10) { + return qwilightIOJudgeBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + public Builder setQwilightIOJudge(net.taehui.EventClass.Event.QwilightIOJudge value) { + if (qwilightIOJudgeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + qwilightIOJudgeBuilder_.setMessage(value); + } + fastTextCase_ = 10; + return this; + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + public Builder setQwilightIOJudge( + net.taehui.EventClass.Event.QwilightIOJudge.Builder builderForValue) { + if (qwilightIOJudgeBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + qwilightIOJudgeBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 10; + return this; + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + public Builder mergeQwilightIOJudge(net.taehui.EventClass.Event.QwilightIOJudge value) { + if (qwilightIOJudgeBuilder_ == null) { + if (fastTextCase_ == 10 && + fastText_ != net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.QwilightIOJudge.newBuilder((net.taehui.EventClass.Event.QwilightIOJudge) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 10) { + qwilightIOJudgeBuilder_.mergeFrom(value); + } else { + qwilightIOJudgeBuilder_.setMessage(value); + } + } + fastTextCase_ = 10; + return this; + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + public Builder clearQwilightIOJudge() { + if (qwilightIOJudgeBuilder_ == null) { + if (fastTextCase_ == 10) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 10) { + fastTextCase_ = 0; + fastText_ = null; + } + qwilightIOJudgeBuilder_.clear(); + } + return this; + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + public net.taehui.EventClass.Event.QwilightIOJudge.Builder getQwilightIOJudgeBuilder() { + return getQwilightIOJudgeFieldBuilder().getBuilder(); + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgeOrBuilder getQwilightIOJudgeOrBuilder() { + if ((fastTextCase_ == 10) && (qwilightIOJudgeBuilder_ != null)) { + return qwilightIOJudgeBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 10) { + return (net.taehui.EventClass.Event.QwilightIOJudge) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOJudge qwilightIOJudge = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOJudge, net.taehui.EventClass.Event.QwilightIOJudge.Builder, net.taehui.EventClass.Event.QwilightIOJudgeOrBuilder> + getQwilightIOJudgeFieldBuilder() { + if (qwilightIOJudgeBuilder_ == null) { + if (!(fastTextCase_ == 10)) { + fastText_ = net.taehui.EventClass.Event.QwilightIOJudge.getDefaultInstance(); + } + qwilightIOJudgeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOJudge, net.taehui.EventClass.Event.QwilightIOJudge.Builder, net.taehui.EventClass.Event.QwilightIOJudgeOrBuilder>( + (net.taehui.EventClass.Event.QwilightIOJudge) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 10; + onChanged(); + return qwilightIOJudgeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOJudge, net.taehui.EventClass.Event.TwilightIOJudge.Builder, net.taehui.EventClass.Event.TwilightIOJudgeOrBuilder> twilightIOJudgeBuilder_; + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + * @return Whether the twilightIOJudge field is set. + */ + @java.lang.Override + public boolean hasTwilightIOJudge() { + return fastTextCase_ == 11; + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + * @return The twilightIOJudge. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudge getTwilightIOJudge() { + if (twilightIOJudgeBuilder_ == null) { + if (fastTextCase_ == 11) { + return (net.taehui.EventClass.Event.TwilightIOJudge) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance(); + } else { + if (fastTextCase_ == 11) { + return twilightIOJudgeBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + public Builder setTwilightIOJudge(net.taehui.EventClass.Event.TwilightIOJudge value) { + if (twilightIOJudgeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightIOJudgeBuilder_.setMessage(value); + } + fastTextCase_ = 11; + return this; + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + public Builder setTwilightIOJudge( + net.taehui.EventClass.Event.TwilightIOJudge.Builder builderForValue) { + if (twilightIOJudgeBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightIOJudgeBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 11; + return this; + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + public Builder mergeTwilightIOJudge(net.taehui.EventClass.Event.TwilightIOJudge value) { + if (twilightIOJudgeBuilder_ == null) { + if (fastTextCase_ == 11 && + fastText_ != net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightIOJudge.newBuilder((net.taehui.EventClass.Event.TwilightIOJudge) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 11) { + twilightIOJudgeBuilder_.mergeFrom(value); + } else { + twilightIOJudgeBuilder_.setMessage(value); + } + } + fastTextCase_ = 11; + return this; + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + public Builder clearTwilightIOJudge() { + if (twilightIOJudgeBuilder_ == null) { + if (fastTextCase_ == 11) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 11) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightIOJudgeBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + public net.taehui.EventClass.Event.TwilightIOJudge.Builder getTwilightIOJudgeBuilder() { + return getTwilightIOJudgeFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgeOrBuilder getTwilightIOJudgeOrBuilder() { + if ((fastTextCase_ == 11) && (twilightIOJudgeBuilder_ != null)) { + return twilightIOJudgeBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 11) { + return (net.taehui.EventClass.Event.TwilightIOJudge) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOJudge twilightIOJudge = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOJudge, net.taehui.EventClass.Event.TwilightIOJudge.Builder, net.taehui.EventClass.Event.TwilightIOJudgeOrBuilder> + getTwilightIOJudgeFieldBuilder() { + if (twilightIOJudgeBuilder_ == null) { + if (!(fastTextCase_ == 11)) { + fastText_ = net.taehui.EventClass.Event.TwilightIOJudge.getDefaultInstance(); + } + twilightIOJudgeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOJudge, net.taehui.EventClass.Event.TwilightIOJudge.Builder, net.taehui.EventClass.Event.TwilightIOJudgeOrBuilder>( + (net.taehui.EventClass.Event.TwilightIOJudge) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 11; + onChanged(); + return twilightIOJudgeBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOJudgmentMeter, net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder, net.taehui.EventClass.Event.QwilightIOJudgmentMeterOrBuilder> qwilightIOJudgmentMeterBuilder_; + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + * @return Whether the qwilightIOJudgmentMeter field is set. + */ + @java.lang.Override + public boolean hasQwilightIOJudgmentMeter() { + return fastTextCase_ == 12; + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + * @return The qwilightIOJudgmentMeter. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgmentMeter getQwilightIOJudgmentMeter() { + if (qwilightIOJudgmentMeterBuilder_ == null) { + if (fastTextCase_ == 12) { + return (net.taehui.EventClass.Event.QwilightIOJudgmentMeter) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance(); + } else { + if (fastTextCase_ == 12) { + return qwilightIOJudgmentMeterBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + public Builder setQwilightIOJudgmentMeter(net.taehui.EventClass.Event.QwilightIOJudgmentMeter value) { + if (qwilightIOJudgmentMeterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + qwilightIOJudgmentMeterBuilder_.setMessage(value); + } + fastTextCase_ = 12; + return this; + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + public Builder setQwilightIOJudgmentMeter( + net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder builderForValue) { + if (qwilightIOJudgmentMeterBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + qwilightIOJudgmentMeterBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 12; + return this; + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + public Builder mergeQwilightIOJudgmentMeter(net.taehui.EventClass.Event.QwilightIOJudgmentMeter value) { + if (qwilightIOJudgmentMeterBuilder_ == null) { + if (fastTextCase_ == 12 && + fastText_ != net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.QwilightIOJudgmentMeter.newBuilder((net.taehui.EventClass.Event.QwilightIOJudgmentMeter) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 12) { + qwilightIOJudgmentMeterBuilder_.mergeFrom(value); + } else { + qwilightIOJudgmentMeterBuilder_.setMessage(value); + } + } + fastTextCase_ = 12; + return this; + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + public Builder clearQwilightIOJudgmentMeter() { + if (qwilightIOJudgmentMeterBuilder_ == null) { + if (fastTextCase_ == 12) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 12) { + fastTextCase_ = 0; + fastText_ = null; + } + qwilightIOJudgmentMeterBuilder_.clear(); + } + return this; + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + public net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder getQwilightIOJudgmentMeterBuilder() { + return getQwilightIOJudgmentMeterFieldBuilder().getBuilder(); + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOJudgmentMeterOrBuilder getQwilightIOJudgmentMeterOrBuilder() { + if ((fastTextCase_ == 12) && (qwilightIOJudgmentMeterBuilder_ != null)) { + return qwilightIOJudgmentMeterBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 12) { + return (net.taehui.EventClass.Event.QwilightIOJudgmentMeter) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOJudgmentMeter, net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder, net.taehui.EventClass.Event.QwilightIOJudgmentMeterOrBuilder> + getQwilightIOJudgmentMeterFieldBuilder() { + if (qwilightIOJudgmentMeterBuilder_ == null) { + if (!(fastTextCase_ == 12)) { + fastText_ = net.taehui.EventClass.Event.QwilightIOJudgmentMeter.getDefaultInstance(); + } + qwilightIOJudgmentMeterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOJudgmentMeter, net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder, net.taehui.EventClass.Event.QwilightIOJudgmentMeterOrBuilder>( + (net.taehui.EventClass.Event.QwilightIOJudgmentMeter) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 12; + onChanged(); + return qwilightIOJudgmentMeterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOJudgmentMeter, net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder, net.taehui.EventClass.Event.TwilightIOJudgmentMeterOrBuilder> twilightIOJudgmentMeterBuilder_; + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + * @return Whether the twilightIOJudgmentMeter field is set. + */ + @java.lang.Override + public boolean hasTwilightIOJudgmentMeter() { + return fastTextCase_ == 13; + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + * @return The twilightIOJudgmentMeter. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgmentMeter getTwilightIOJudgmentMeter() { + if (twilightIOJudgmentMeterBuilder_ == null) { + if (fastTextCase_ == 13) { + return (net.taehui.EventClass.Event.TwilightIOJudgmentMeter) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance(); + } else { + if (fastTextCase_ == 13) { + return twilightIOJudgmentMeterBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + public Builder setTwilightIOJudgmentMeter(net.taehui.EventClass.Event.TwilightIOJudgmentMeter value) { + if (twilightIOJudgmentMeterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightIOJudgmentMeterBuilder_.setMessage(value); + } + fastTextCase_ = 13; + return this; + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + public Builder setTwilightIOJudgmentMeter( + net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder builderForValue) { + if (twilightIOJudgmentMeterBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightIOJudgmentMeterBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 13; + return this; + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + public Builder mergeTwilightIOJudgmentMeter(net.taehui.EventClass.Event.TwilightIOJudgmentMeter value) { + if (twilightIOJudgmentMeterBuilder_ == null) { + if (fastTextCase_ == 13 && + fastText_ != net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightIOJudgmentMeter.newBuilder((net.taehui.EventClass.Event.TwilightIOJudgmentMeter) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 13) { + twilightIOJudgmentMeterBuilder_.mergeFrom(value); + } else { + twilightIOJudgmentMeterBuilder_.setMessage(value); + } + } + fastTextCase_ = 13; + return this; + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + public Builder clearTwilightIOJudgmentMeter() { + if (twilightIOJudgmentMeterBuilder_ == null) { + if (fastTextCase_ == 13) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 13) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightIOJudgmentMeterBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + public net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder getTwilightIOJudgmentMeterBuilder() { + return getTwilightIOJudgmentMeterFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOJudgmentMeterOrBuilder getTwilightIOJudgmentMeterOrBuilder() { + if ((fastTextCase_ == 13) && (twilightIOJudgmentMeterBuilder_ != null)) { + return twilightIOJudgmentMeterBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 13) { + return (net.taehui.EventClass.Event.TwilightIOJudgmentMeter) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOJudgmentMeter, net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder, net.taehui.EventClass.Event.TwilightIOJudgmentMeterOrBuilder> + getTwilightIOJudgmentMeterFieldBuilder() { + if (twilightIOJudgmentMeterBuilder_ == null) { + if (!(fastTextCase_ == 13)) { + fastText_ = net.taehui.EventClass.Event.TwilightIOJudgmentMeter.getDefaultInstance(); + } + twilightIOJudgmentMeterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOJudgmentMeter, net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder, net.taehui.EventClass.Event.TwilightIOJudgmentMeterOrBuilder>( + (net.taehui.EventClass.Event.TwilightIOJudgmentMeter) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 13; + onChanged(); + return twilightIOJudgmentMeterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIONoteVisibility, net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder, net.taehui.EventClass.Event.QwilightIONoteVisibilityOrBuilder> qwilightIONoteVisibilityBuilder_; + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + * @return Whether the qwilightIONoteVisibility field is set. + */ + @java.lang.Override + public boolean hasQwilightIONoteVisibility() { + return fastTextCase_ == 14; + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + * @return The qwilightIONoteVisibility. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIONoteVisibility getQwilightIONoteVisibility() { + if (qwilightIONoteVisibilityBuilder_ == null) { + if (fastTextCase_ == 14) { + return (net.taehui.EventClass.Event.QwilightIONoteVisibility) fastText_; + } + return net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance(); + } else { + if (fastTextCase_ == 14) { + return qwilightIONoteVisibilityBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance(); + } + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + public Builder setQwilightIONoteVisibility(net.taehui.EventClass.Event.QwilightIONoteVisibility value) { + if (qwilightIONoteVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + qwilightIONoteVisibilityBuilder_.setMessage(value); + } + fastTextCase_ = 14; + return this; + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + public Builder setQwilightIONoteVisibility( + net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder builderForValue) { + if (qwilightIONoteVisibilityBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + qwilightIONoteVisibilityBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 14; + return this; + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + public Builder mergeQwilightIONoteVisibility(net.taehui.EventClass.Event.QwilightIONoteVisibility value) { + if (qwilightIONoteVisibilityBuilder_ == null) { + if (fastTextCase_ == 14 && + fastText_ != net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.QwilightIONoteVisibility.newBuilder((net.taehui.EventClass.Event.QwilightIONoteVisibility) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 14) { + qwilightIONoteVisibilityBuilder_.mergeFrom(value); + } else { + qwilightIONoteVisibilityBuilder_.setMessage(value); + } + } + fastTextCase_ = 14; + return this; + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + public Builder clearQwilightIONoteVisibility() { + if (qwilightIONoteVisibilityBuilder_ == null) { + if (fastTextCase_ == 14) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 14) { + fastTextCase_ = 0; + fastText_ = null; + } + qwilightIONoteVisibilityBuilder_.clear(); + } + return this; + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + public net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder getQwilightIONoteVisibilityBuilder() { + return getQwilightIONoteVisibilityFieldBuilder().getBuilder(); + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIONoteVisibilityOrBuilder getQwilightIONoteVisibilityOrBuilder() { + if ((fastTextCase_ == 14) && (qwilightIONoteVisibilityBuilder_ != null)) { + return qwilightIONoteVisibilityBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 14) { + return (net.taehui.EventClass.Event.QwilightIONoteVisibility) fastText_; + } + return net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance(); + } + } + /** + * .Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIONoteVisibility, net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder, net.taehui.EventClass.Event.QwilightIONoteVisibilityOrBuilder> + getQwilightIONoteVisibilityFieldBuilder() { + if (qwilightIONoteVisibilityBuilder_ == null) { + if (!(fastTextCase_ == 14)) { + fastText_ = net.taehui.EventClass.Event.QwilightIONoteVisibility.getDefaultInstance(); + } + qwilightIONoteVisibilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIONoteVisibility, net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder, net.taehui.EventClass.Event.QwilightIONoteVisibilityOrBuilder>( + (net.taehui.EventClass.Event.QwilightIONoteVisibility) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 14; + onChanged(); + return qwilightIONoteVisibilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIONoteVisibility, net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder, net.taehui.EventClass.Event.TwilightIONoteVisibilityOrBuilder> twilightIONoteVisibilityBuilder_; + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + * @return Whether the twilightIONoteVisibility field is set. + */ + @java.lang.Override + public boolean hasTwilightIONoteVisibility() { + return fastTextCase_ == 15; + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + * @return The twilightIONoteVisibility. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIONoteVisibility getTwilightIONoteVisibility() { + if (twilightIONoteVisibilityBuilder_ == null) { + if (fastTextCase_ == 15) { + return (net.taehui.EventClass.Event.TwilightIONoteVisibility) fastText_; + } + return net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance(); + } else { + if (fastTextCase_ == 15) { + return twilightIONoteVisibilityBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance(); + } + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + public Builder setTwilightIONoteVisibility(net.taehui.EventClass.Event.TwilightIONoteVisibility value) { + if (twilightIONoteVisibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightIONoteVisibilityBuilder_.setMessage(value); + } + fastTextCase_ = 15; + return this; + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + public Builder setTwilightIONoteVisibility( + net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder builderForValue) { + if (twilightIONoteVisibilityBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightIONoteVisibilityBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 15; + return this; + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + public Builder mergeTwilightIONoteVisibility(net.taehui.EventClass.Event.TwilightIONoteVisibility value) { + if (twilightIONoteVisibilityBuilder_ == null) { + if (fastTextCase_ == 15 && + fastText_ != net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightIONoteVisibility.newBuilder((net.taehui.EventClass.Event.TwilightIONoteVisibility) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 15) { + twilightIONoteVisibilityBuilder_.mergeFrom(value); + } else { + twilightIONoteVisibilityBuilder_.setMessage(value); + } + } + fastTextCase_ = 15; + return this; + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + public Builder clearTwilightIONoteVisibility() { + if (twilightIONoteVisibilityBuilder_ == null) { + if (fastTextCase_ == 15) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 15) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightIONoteVisibilityBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + public net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder getTwilightIONoteVisibilityBuilder() { + return getTwilightIONoteVisibilityFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIONoteVisibilityOrBuilder getTwilightIONoteVisibilityOrBuilder() { + if ((fastTextCase_ == 15) && (twilightIONoteVisibilityBuilder_ != null)) { + return twilightIONoteVisibilityBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 15) { + return (net.taehui.EventClass.Event.TwilightIONoteVisibility) fastText_; + } + return net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance(); + } + } + /** + * .Event.TwilightIONoteVisibility twilightIONoteVisibility = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIONoteVisibility, net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder, net.taehui.EventClass.Event.TwilightIONoteVisibilityOrBuilder> + getTwilightIONoteVisibilityFieldBuilder() { + if (twilightIONoteVisibilityBuilder_ == null) { + if (!(fastTextCase_ == 15)) { + fastText_ = net.taehui.EventClass.Event.TwilightIONoteVisibility.getDefaultInstance(); + } + twilightIONoteVisibilityBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIONoteVisibility, net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder, net.taehui.EventClass.Event.TwilightIONoteVisibilityOrBuilder>( + (net.taehui.EventClass.Event.TwilightIONoteVisibility) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 15; + onChanged(); + return twilightIONoteVisibilityBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOMultiplier, net.taehui.EventClass.Event.QwilightIOMultiplier.Builder, net.taehui.EventClass.Event.QwilightIOMultiplierOrBuilder> qwilightIOMultiplierBuilder_; + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + * @return Whether the qwilightIOMultiplier field is set. + */ + @java.lang.Override + public boolean hasQwilightIOMultiplier() { + return fastTextCase_ == 16; + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + * @return The qwilightIOMultiplier. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOMultiplier getQwilightIOMultiplier() { + if (qwilightIOMultiplierBuilder_ == null) { + if (fastTextCase_ == 16) { + return (net.taehui.EventClass.Event.QwilightIOMultiplier) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance(); + } else { + if (fastTextCase_ == 16) { + return qwilightIOMultiplierBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + public Builder setQwilightIOMultiplier(net.taehui.EventClass.Event.QwilightIOMultiplier value) { + if (qwilightIOMultiplierBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + qwilightIOMultiplierBuilder_.setMessage(value); + } + fastTextCase_ = 16; + return this; + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + public Builder setQwilightIOMultiplier( + net.taehui.EventClass.Event.QwilightIOMultiplier.Builder builderForValue) { + if (qwilightIOMultiplierBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + qwilightIOMultiplierBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 16; + return this; + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + public Builder mergeQwilightIOMultiplier(net.taehui.EventClass.Event.QwilightIOMultiplier value) { + if (qwilightIOMultiplierBuilder_ == null) { + if (fastTextCase_ == 16 && + fastText_ != net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.QwilightIOMultiplier.newBuilder((net.taehui.EventClass.Event.QwilightIOMultiplier) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 16) { + qwilightIOMultiplierBuilder_.mergeFrom(value); + } else { + qwilightIOMultiplierBuilder_.setMessage(value); + } + } + fastTextCase_ = 16; + return this; + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + public Builder clearQwilightIOMultiplier() { + if (qwilightIOMultiplierBuilder_ == null) { + if (fastTextCase_ == 16) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 16) { + fastTextCase_ = 0; + fastText_ = null; + } + qwilightIOMultiplierBuilder_.clear(); + } + return this; + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + public net.taehui.EventClass.Event.QwilightIOMultiplier.Builder getQwilightIOMultiplierBuilder() { + return getQwilightIOMultiplierFieldBuilder().getBuilder(); + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOMultiplierOrBuilder getQwilightIOMultiplierOrBuilder() { + if ((fastTextCase_ == 16) && (qwilightIOMultiplierBuilder_ != null)) { + return qwilightIOMultiplierBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 16) { + return (net.taehui.EventClass.Event.QwilightIOMultiplier) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOMultiplier qwilightIOMultiplier = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOMultiplier, net.taehui.EventClass.Event.QwilightIOMultiplier.Builder, net.taehui.EventClass.Event.QwilightIOMultiplierOrBuilder> + getQwilightIOMultiplierFieldBuilder() { + if (qwilightIOMultiplierBuilder_ == null) { + if (!(fastTextCase_ == 16)) { + fastText_ = net.taehui.EventClass.Event.QwilightIOMultiplier.getDefaultInstance(); + } + qwilightIOMultiplierBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOMultiplier, net.taehui.EventClass.Event.QwilightIOMultiplier.Builder, net.taehui.EventClass.Event.QwilightIOMultiplierOrBuilder>( + (net.taehui.EventClass.Event.QwilightIOMultiplier) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 16; + onChanged(); + return qwilightIOMultiplierBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOMultiplier, net.taehui.EventClass.Event.TwilightIOMultiplier.Builder, net.taehui.EventClass.Event.TwilightIOMultiplierOrBuilder> twilightIOMultiplierBuilder_; + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + * @return Whether the twilightIOMultiplier field is set. + */ + @java.lang.Override + public boolean hasTwilightIOMultiplier() { + return fastTextCase_ == 17; + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + * @return The twilightIOMultiplier. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOMultiplier getTwilightIOMultiplier() { + if (twilightIOMultiplierBuilder_ == null) { + if (fastTextCase_ == 17) { + return (net.taehui.EventClass.Event.TwilightIOMultiplier) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance(); + } else { + if (fastTextCase_ == 17) { + return twilightIOMultiplierBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + public Builder setTwilightIOMultiplier(net.taehui.EventClass.Event.TwilightIOMultiplier value) { + if (twilightIOMultiplierBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightIOMultiplierBuilder_.setMessage(value); + } + fastTextCase_ = 17; + return this; + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + public Builder setTwilightIOMultiplier( + net.taehui.EventClass.Event.TwilightIOMultiplier.Builder builderForValue) { + if (twilightIOMultiplierBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightIOMultiplierBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 17; + return this; + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + public Builder mergeTwilightIOMultiplier(net.taehui.EventClass.Event.TwilightIOMultiplier value) { + if (twilightIOMultiplierBuilder_ == null) { + if (fastTextCase_ == 17 && + fastText_ != net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightIOMultiplier.newBuilder((net.taehui.EventClass.Event.TwilightIOMultiplier) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 17) { + twilightIOMultiplierBuilder_.mergeFrom(value); + } else { + twilightIOMultiplierBuilder_.setMessage(value); + } + } + fastTextCase_ = 17; + return this; + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + public Builder clearTwilightIOMultiplier() { + if (twilightIOMultiplierBuilder_ == null) { + if (fastTextCase_ == 17) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 17) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightIOMultiplierBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + public net.taehui.EventClass.Event.TwilightIOMultiplier.Builder getTwilightIOMultiplierBuilder() { + return getTwilightIOMultiplierFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOMultiplierOrBuilder getTwilightIOMultiplierOrBuilder() { + if ((fastTextCase_ == 17) && (twilightIOMultiplierBuilder_ != null)) { + return twilightIOMultiplierBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 17) { + return (net.taehui.EventClass.Event.TwilightIOMultiplier) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOMultiplier twilightIOMultiplier = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOMultiplier, net.taehui.EventClass.Event.TwilightIOMultiplier.Builder, net.taehui.EventClass.Event.TwilightIOMultiplierOrBuilder> + getTwilightIOMultiplierFieldBuilder() { + if (twilightIOMultiplierBuilder_ == null) { + if (!(fastTextCase_ == 17)) { + fastText_ = net.taehui.EventClass.Event.TwilightIOMultiplier.getDefaultInstance(); + } + twilightIOMultiplierBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOMultiplier, net.taehui.EventClass.Event.TwilightIOMultiplier.Builder, net.taehui.EventClass.Event.TwilightIOMultiplierOrBuilder>( + (net.taehui.EventClass.Event.TwilightIOMultiplier) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 17; + onChanged(); + return twilightIOMultiplierBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOAudioMultiplier, net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder, net.taehui.EventClass.Event.QwilightIOAudioMultiplierOrBuilder> qwilightIOAudioMultiplierBuilder_; + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + * @return Whether the qwilightIOAudioMultiplier field is set. + */ + @java.lang.Override + public boolean hasQwilightIOAudioMultiplier() { + return fastTextCase_ == 18; + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + * @return The qwilightIOAudioMultiplier. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOAudioMultiplier getQwilightIOAudioMultiplier() { + if (qwilightIOAudioMultiplierBuilder_ == null) { + if (fastTextCase_ == 18) { + return (net.taehui.EventClass.Event.QwilightIOAudioMultiplier) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance(); + } else { + if (fastTextCase_ == 18) { + return qwilightIOAudioMultiplierBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + public Builder setQwilightIOAudioMultiplier(net.taehui.EventClass.Event.QwilightIOAudioMultiplier value) { + if (qwilightIOAudioMultiplierBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + qwilightIOAudioMultiplierBuilder_.setMessage(value); + } + fastTextCase_ = 18; + return this; + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + public Builder setQwilightIOAudioMultiplier( + net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder builderForValue) { + if (qwilightIOAudioMultiplierBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + qwilightIOAudioMultiplierBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 18; + return this; + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + public Builder mergeQwilightIOAudioMultiplier(net.taehui.EventClass.Event.QwilightIOAudioMultiplier value) { + if (qwilightIOAudioMultiplierBuilder_ == null) { + if (fastTextCase_ == 18 && + fastText_ != net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.QwilightIOAudioMultiplier.newBuilder((net.taehui.EventClass.Event.QwilightIOAudioMultiplier) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 18) { + qwilightIOAudioMultiplierBuilder_.mergeFrom(value); + } else { + qwilightIOAudioMultiplierBuilder_.setMessage(value); + } + } + fastTextCase_ = 18; + return this; + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + public Builder clearQwilightIOAudioMultiplier() { + if (qwilightIOAudioMultiplierBuilder_ == null) { + if (fastTextCase_ == 18) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 18) { + fastTextCase_ = 0; + fastText_ = null; + } + qwilightIOAudioMultiplierBuilder_.clear(); + } + return this; + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + public net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder getQwilightIOAudioMultiplierBuilder() { + return getQwilightIOAudioMultiplierFieldBuilder().getBuilder(); + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightIOAudioMultiplierOrBuilder getQwilightIOAudioMultiplierOrBuilder() { + if ((fastTextCase_ == 18) && (qwilightIOAudioMultiplierBuilder_ != null)) { + return qwilightIOAudioMultiplierBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 18) { + return (net.taehui.EventClass.Event.QwilightIOAudioMultiplier) fastText_; + } + return net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance(); + } + } + /** + * .Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOAudioMultiplier, net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder, net.taehui.EventClass.Event.QwilightIOAudioMultiplierOrBuilder> + getQwilightIOAudioMultiplierFieldBuilder() { + if (qwilightIOAudioMultiplierBuilder_ == null) { + if (!(fastTextCase_ == 18)) { + fastText_ = net.taehui.EventClass.Event.QwilightIOAudioMultiplier.getDefaultInstance(); + } + qwilightIOAudioMultiplierBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightIOAudioMultiplier, net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder, net.taehui.EventClass.Event.QwilightIOAudioMultiplierOrBuilder>( + (net.taehui.EventClass.Event.QwilightIOAudioMultiplier) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 18; + onChanged(); + return qwilightIOAudioMultiplierBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOAudioMultiplier, net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder, net.taehui.EventClass.Event.TwilightIOAudioMultiplierOrBuilder> twilightIOAudioMultiplierBuilder_; + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + * @return Whether the twilightIOAudioMultiplier field is set. + */ + @java.lang.Override + public boolean hasTwilightIOAudioMultiplier() { + return fastTextCase_ == 19; + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + * @return The twilightIOAudioMultiplier. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOAudioMultiplier getTwilightIOAudioMultiplier() { + if (twilightIOAudioMultiplierBuilder_ == null) { + if (fastTextCase_ == 19) { + return (net.taehui.EventClass.Event.TwilightIOAudioMultiplier) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance(); + } else { + if (fastTextCase_ == 19) { + return twilightIOAudioMultiplierBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + public Builder setTwilightIOAudioMultiplier(net.taehui.EventClass.Event.TwilightIOAudioMultiplier value) { + if (twilightIOAudioMultiplierBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightIOAudioMultiplierBuilder_.setMessage(value); + } + fastTextCase_ = 19; + return this; + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + public Builder setTwilightIOAudioMultiplier( + net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder builderForValue) { + if (twilightIOAudioMultiplierBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightIOAudioMultiplierBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 19; + return this; + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + public Builder mergeTwilightIOAudioMultiplier(net.taehui.EventClass.Event.TwilightIOAudioMultiplier value) { + if (twilightIOAudioMultiplierBuilder_ == null) { + if (fastTextCase_ == 19 && + fastText_ != net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightIOAudioMultiplier.newBuilder((net.taehui.EventClass.Event.TwilightIOAudioMultiplier) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 19) { + twilightIOAudioMultiplierBuilder_.mergeFrom(value); + } else { + twilightIOAudioMultiplierBuilder_.setMessage(value); + } + } + fastTextCase_ = 19; + return this; + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + public Builder clearTwilightIOAudioMultiplier() { + if (twilightIOAudioMultiplierBuilder_ == null) { + if (fastTextCase_ == 19) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 19) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightIOAudioMultiplierBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + public net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder getTwilightIOAudioMultiplierBuilder() { + return getTwilightIOAudioMultiplierFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightIOAudioMultiplierOrBuilder getTwilightIOAudioMultiplierOrBuilder() { + if ((fastTextCase_ == 19) && (twilightIOAudioMultiplierBuilder_ != null)) { + return twilightIOAudioMultiplierBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 19) { + return (net.taehui.EventClass.Event.TwilightIOAudioMultiplier) fastText_; + } + return net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance(); + } + } + /** + * .Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOAudioMultiplier, net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder, net.taehui.EventClass.Event.TwilightIOAudioMultiplierOrBuilder> + getTwilightIOAudioMultiplierFieldBuilder() { + if (twilightIOAudioMultiplierBuilder_ == null) { + if (!(fastTextCase_ == 19)) { + fastText_ = net.taehui.EventClass.Event.TwilightIOAudioMultiplier.getDefaultInstance(); + } + twilightIOAudioMultiplierBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightIOAudioMultiplier, net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder, net.taehui.EventClass.Event.TwilightIOAudioMultiplierOrBuilder>( + (net.taehui.EventClass.Event.TwilightIOAudioMultiplier) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 19; + onChanged(); + return twilightIOAudioMultiplierBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightAudioInput, net.taehui.EventClass.Event.TwilightAudioInput.Builder, net.taehui.EventClass.Event.TwilightAudioInputOrBuilder> twilightAudioInputBuilder_; + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + * @return Whether the twilightAudioInput field is set. + */ + @java.lang.Override + public boolean hasTwilightAudioInput() { + return fastTextCase_ == 20; + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + * @return The twilightAudioInput. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightAudioInput getTwilightAudioInput() { + if (twilightAudioInputBuilder_ == null) { + if (fastTextCase_ == 20) { + return (net.taehui.EventClass.Event.TwilightAudioInput) fastText_; + } + return net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance(); + } else { + if (fastTextCase_ == 20) { + return twilightAudioInputBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance(); + } + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + public Builder setTwilightAudioInput(net.taehui.EventClass.Event.TwilightAudioInput value) { + if (twilightAudioInputBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightAudioInputBuilder_.setMessage(value); + } + fastTextCase_ = 20; + return this; + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + public Builder setTwilightAudioInput( + net.taehui.EventClass.Event.TwilightAudioInput.Builder builderForValue) { + if (twilightAudioInputBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightAudioInputBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 20; + return this; + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + public Builder mergeTwilightAudioInput(net.taehui.EventClass.Event.TwilightAudioInput value) { + if (twilightAudioInputBuilder_ == null) { + if (fastTextCase_ == 20 && + fastText_ != net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightAudioInput.newBuilder((net.taehui.EventClass.Event.TwilightAudioInput) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 20) { + twilightAudioInputBuilder_.mergeFrom(value); + } else { + twilightAudioInputBuilder_.setMessage(value); + } + } + fastTextCase_ = 20; + return this; + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + public Builder clearTwilightAudioInput() { + if (twilightAudioInputBuilder_ == null) { + if (fastTextCase_ == 20) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 20) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightAudioInputBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + public net.taehui.EventClass.Event.TwilightAudioInput.Builder getTwilightAudioInputBuilder() { + return getTwilightAudioInputFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightAudioInputOrBuilder getTwilightAudioInputOrBuilder() { + if ((fastTextCase_ == 20) && (twilightAudioInputBuilder_ != null)) { + return twilightAudioInputBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 20) { + return (net.taehui.EventClass.Event.TwilightAudioInput) fastText_; + } + return net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance(); + } + } + /** + * .Event.TwilightAudioInput twilightAudioInput = 20; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightAudioInput, net.taehui.EventClass.Event.TwilightAudioInput.Builder, net.taehui.EventClass.Event.TwilightAudioInputOrBuilder> + getTwilightAudioInputFieldBuilder() { + if (twilightAudioInputBuilder_ == null) { + if (!(fastTextCase_ == 20)) { + fastText_ = net.taehui.EventClass.Event.TwilightAudioInput.getDefaultInstance(); + } + twilightAudioInputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightAudioInput, net.taehui.EventClass.Event.TwilightAudioInput.Builder, net.taehui.EventClass.Event.TwilightAudioInputOrBuilder>( + (net.taehui.EventClass.Event.TwilightAudioInput) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 20; + onChanged(); + return twilightAudioInputBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightPostItem, net.taehui.EventClass.Event.QwilightPostItem.Builder, net.taehui.EventClass.Event.QwilightPostItemOrBuilder> qwilightPostItemBuilder_; + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + * @return Whether the qwilightPostItem field is set. + */ + @java.lang.Override + public boolean hasQwilightPostItem() { + return fastTextCase_ == 21; + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + * @return The qwilightPostItem. + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightPostItem getQwilightPostItem() { + if (qwilightPostItemBuilder_ == null) { + if (fastTextCase_ == 21) { + return (net.taehui.EventClass.Event.QwilightPostItem) fastText_; + } + return net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance(); + } else { + if (fastTextCase_ == 21) { + return qwilightPostItemBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance(); + } + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + public Builder setQwilightPostItem(net.taehui.EventClass.Event.QwilightPostItem value) { + if (qwilightPostItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + qwilightPostItemBuilder_.setMessage(value); + } + fastTextCase_ = 21; + return this; + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + public Builder setQwilightPostItem( + net.taehui.EventClass.Event.QwilightPostItem.Builder builderForValue) { + if (qwilightPostItemBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + qwilightPostItemBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 21; + return this; + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + public Builder mergeQwilightPostItem(net.taehui.EventClass.Event.QwilightPostItem value) { + if (qwilightPostItemBuilder_ == null) { + if (fastTextCase_ == 21 && + fastText_ != net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.QwilightPostItem.newBuilder((net.taehui.EventClass.Event.QwilightPostItem) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 21) { + qwilightPostItemBuilder_.mergeFrom(value); + } else { + qwilightPostItemBuilder_.setMessage(value); + } + } + fastTextCase_ = 21; + return this; + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + public Builder clearQwilightPostItem() { + if (qwilightPostItemBuilder_ == null) { + if (fastTextCase_ == 21) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 21) { + fastTextCase_ = 0; + fastText_ = null; + } + qwilightPostItemBuilder_.clear(); + } + return this; + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + public net.taehui.EventClass.Event.QwilightPostItem.Builder getQwilightPostItemBuilder() { + return getQwilightPostItemFieldBuilder().getBuilder(); + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + @java.lang.Override + public net.taehui.EventClass.Event.QwilightPostItemOrBuilder getQwilightPostItemOrBuilder() { + if ((fastTextCase_ == 21) && (qwilightPostItemBuilder_ != null)) { + return qwilightPostItemBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 21) { + return (net.taehui.EventClass.Event.QwilightPostItem) fastText_; + } + return net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance(); + } + } + /** + * .Event.QwilightPostItem qwilightPostItem = 21; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightPostItem, net.taehui.EventClass.Event.QwilightPostItem.Builder, net.taehui.EventClass.Event.QwilightPostItemOrBuilder> + getQwilightPostItemFieldBuilder() { + if (qwilightPostItemBuilder_ == null) { + if (!(fastTextCase_ == 21)) { + fastText_ = net.taehui.EventClass.Event.QwilightPostItem.getDefaultInstance(); + } + qwilightPostItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.QwilightPostItem, net.taehui.EventClass.Event.QwilightPostItem.Builder, net.taehui.EventClass.Event.QwilightPostItemOrBuilder>( + (net.taehui.EventClass.Event.QwilightPostItem) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 21; + onChanged(); + return qwilightPostItemBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightPostItem, net.taehui.EventClass.Event.TwilightPostItem.Builder, net.taehui.EventClass.Event.TwilightPostItemOrBuilder> twilightPostItemBuilder_; + /** + * .Event.TwilightPostItem twilightPostItem = 22; + * @return Whether the twilightPostItem field is set. + */ + @java.lang.Override + public boolean hasTwilightPostItem() { + return fastTextCase_ == 22; + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + * @return The twilightPostItem. + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightPostItem getTwilightPostItem() { + if (twilightPostItemBuilder_ == null) { + if (fastTextCase_ == 22) { + return (net.taehui.EventClass.Event.TwilightPostItem) fastText_; + } + return net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance(); + } else { + if (fastTextCase_ == 22) { + return twilightPostItemBuilder_.getMessage(); + } + return net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance(); + } + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + public Builder setTwilightPostItem(net.taehui.EventClass.Event.TwilightPostItem value) { + if (twilightPostItemBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + fastText_ = value; + onChanged(); + } else { + twilightPostItemBuilder_.setMessage(value); + } + fastTextCase_ = 22; + return this; + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + public Builder setTwilightPostItem( + net.taehui.EventClass.Event.TwilightPostItem.Builder builderForValue) { + if (twilightPostItemBuilder_ == null) { + fastText_ = builderForValue.build(); + onChanged(); + } else { + twilightPostItemBuilder_.setMessage(builderForValue.build()); + } + fastTextCase_ = 22; + return this; + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + public Builder mergeTwilightPostItem(net.taehui.EventClass.Event.TwilightPostItem value) { + if (twilightPostItemBuilder_ == null) { + if (fastTextCase_ == 22 && + fastText_ != net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance()) { + fastText_ = net.taehui.EventClass.Event.TwilightPostItem.newBuilder((net.taehui.EventClass.Event.TwilightPostItem) fastText_) + .mergeFrom(value).buildPartial(); + } else { + fastText_ = value; + } + onChanged(); + } else { + if (fastTextCase_ == 22) { + twilightPostItemBuilder_.mergeFrom(value); + } else { + twilightPostItemBuilder_.setMessage(value); + } + } + fastTextCase_ = 22; + return this; + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + public Builder clearTwilightPostItem() { + if (twilightPostItemBuilder_ == null) { + if (fastTextCase_ == 22) { + fastTextCase_ = 0; + fastText_ = null; + onChanged(); + } + } else { + if (fastTextCase_ == 22) { + fastTextCase_ = 0; + fastText_ = null; + } + twilightPostItemBuilder_.clear(); + } + return this; + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + public net.taehui.EventClass.Event.TwilightPostItem.Builder getTwilightPostItemBuilder() { + return getTwilightPostItemFieldBuilder().getBuilder(); + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + @java.lang.Override + public net.taehui.EventClass.Event.TwilightPostItemOrBuilder getTwilightPostItemOrBuilder() { + if ((fastTextCase_ == 22) && (twilightPostItemBuilder_ != null)) { + return twilightPostItemBuilder_.getMessageOrBuilder(); + } else { + if (fastTextCase_ == 22) { + return (net.taehui.EventClass.Event.TwilightPostItem) fastText_; + } + return net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance(); + } + } + /** + * .Event.TwilightPostItem twilightPostItem = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightPostItem, net.taehui.EventClass.Event.TwilightPostItem.Builder, net.taehui.EventClass.Event.TwilightPostItemOrBuilder> + getTwilightPostItemFieldBuilder() { + if (twilightPostItemBuilder_ == null) { + if (!(fastTextCase_ == 22)) { + fastText_ = net.taehui.EventClass.Event.TwilightPostItem.getDefaultInstance(); + } + twilightPostItemBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + net.taehui.EventClass.Event.TwilightPostItem, net.taehui.EventClass.Event.TwilightPostItem.Builder, net.taehui.EventClass.Event.TwilightPostItemOrBuilder>( + (net.taehui.EventClass.Event.TwilightPostItem) fastText_, + getParentForChildren(), + isClean()); + fastText_ = null; + } + fastTextCase_ = 22; + onChanged(); + return twilightPostItemBuilder_; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Event) + } + + // @@protoc_insertion_point(class_scope:Event) + private static final net.taehui.EventClass.Event DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new net.taehui.EventClass.Event(); + } + + public static net.taehui.EventClass.Event getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Event parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public net.taehui.EventClass.Event getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightCallNet_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightCallNet_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightCallNet_CallNetItem_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightCallNet_CallNetItem_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_QwilightCallNet_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_QwilightCallNet_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_NetDrawing_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_NetDrawing_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_DrawingComponent_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_DrawingComponent_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_QwilightIOInput_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_QwilightIOInput_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightIOInput_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightIOInput_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_QwilightIOJudge_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_QwilightIOJudge_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightIOJudge_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightIOJudge_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_QwilightIOJudgmentMeter_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_QwilightIOJudgmentMeter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightIOJudgmentMeter_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightIOJudgmentMeter_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_QwilightIONoteVisibility_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_QwilightIONoteVisibility_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightIONoteVisibility_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightIONoteVisibility_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_QwilightIOMultiplier_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_QwilightIOMultiplier_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightIOMultiplier_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightIOMultiplier_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_QwilightIOAudioMultiplier_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_QwilightIOAudioMultiplier_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightIOAudioMultiplier_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightIOAudioMultiplier_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightAudioInput_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightAudioInput_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_QwilightPostItem_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_QwilightPostItem_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Event_TwilightPostItem_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Event_TwilightPostItem_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\013Event.proto\"\3760\n\005Event\022\016\n\006millis\030\001 \001(\003\022" + + "\020\n\010avatarID\030\002 \001(\t\022\037\n\007eventID\030\003 \001(\0162\016.Eve" + + "nt.EventID\022\014\n\004text\030\004 \001(\t\022\014\n\004data\030\005 \003(\014\0221" + + "\n\017qwilightCallNet\030\006 \001(\0132\026.Event.Qwilight" + + "CallNetH\000\0221\n\017twilightCallNet\030\007 \001(\0132\026.Eve" + + "nt.TwilightCallNetH\000\0221\n\017qwilightIOInput\030" + + "\010 \001(\0132\026.Event.QwilightIOInputH\000\0221\n\017twili" + + "ghtIOInput\030\t \001(\0132\026.Event.TwilightIOInput" + + "H\000\0221\n\017qwilightIOJudge\030\n \001(\0132\026.Event.Qwil" + + "ightIOJudgeH\000\0221\n\017twilightIOJudge\030\013 \001(\0132\026" + + ".Event.TwilightIOJudgeH\000\022A\n\027qwilightIOJu" + + "dgmentMeter\030\014 \001(\0132\036.Event.QwilightIOJudg" + + "mentMeterH\000\022A\n\027twilightIOJudgmentMeter\030\r" + + " \001(\0132\036.Event.TwilightIOJudgmentMeterH\000\022C" + + "\n\030qwilightIONoteVisibility\030\016 \001(\0132\037.Event" + + ".QwilightIONoteVisibilityH\000\022C\n\030twilightI" + + "ONoteVisibility\030\017 \001(\0132\037.Event.TwilightIO" + + "NoteVisibilityH\000\022;\n\024qwilightIOMultiplier" + + "\030\020 \001(\0132\033.Event.QwilightIOMultiplierH\000\022;\n" + + "\024twilightIOMultiplier\030\021 \001(\0132\033.Event.Twil" + + "ightIOMultiplierH\000\022E\n\031qwilightIOAudioMul" + + "tiplier\030\022 \001(\0132 .Event.QwilightIOAudioMul" + + "tiplierH\000\022E\n\031twilightIOAudioMultiplier\030\023" + + " \001(\0132 .Event.TwilightIOAudioMultiplierH\000" + + "\0227\n\022twilightAudioInput\030\024 \001(\0132\031.Event.Twi" + + "lightAudioInputH\000\0223\n\020qwilightPostItem\030\025 " + + "\001(\0132\027.Event.QwilightPostItemH\000\0223\n\020twilig" + + "htPostItem\030\026 \001(\0132\027.Event.TwilightPostIte" + + "mH\000\032\251\003\n\017TwilightCallNet\022\021\n\thandlerID\030\001 \001" + + "(\t\0220\n\004data\030\002 \003(\0132\".Event.TwilightCallNet" + + ".CallNetItem\032\320\002\n\013CallNetItem\022/\n\017avatarNe" + + "tStatus\030\001 \001(\0162\026.Event.AvatarNetStatus\022\020\n" + + "\010avatarID\030\002 \001(\t\022\022\n\navatarName\030\003 \001(\t\022\r\n\005s" + + "tand\030\004 \001(\005\022\014\n\004band\030\005 \001(\005\022\r\n\005point\030\006 \001(\001\022" + + "\021\n\thitPoints\030\007 \001(\001\022\020\n\010isFailed\030\010 \001(\010\022\022\n\n" + + "lastJudged\030\t \001(\005\022\025\n\rhitPointsMode\030\n \001(\005\022" + + "\026\n\016targetPosition\030\013 \001(\005\022#\n\010drawings\030\014 \003(" + + "\0132\021.Event.NetDrawing\0221\n\020drawingComponent" + + "\030\r \001(\0132\027.Event.DrawingComponent\032\237\n\n\017Qwil" + + "ightCallNet\022\016\n\006siteID\030\001 \001(\t\022\021\n\thandlerID" + + "\030\002 \001(\t\022/\n\017avatarNetStatus\030\003 \001(\0162\026.Event." + + "AvatarNetStatus\022\r\n\005stand\030\004 \001(\005\022\023\n\013highes" + + "tBand\030\005 \001(\005\022\r\n\005point\030\006 \001(\001\022\021\n\thitPoints\030" + + "\007 \001(\001\022\020\n\010isFailed\030\010 \001(\010\022\022\n\nlastJudged\030\t " + + "\001(\005\022#\n\010drawings\030\n \003(\0132\021.Event.NetDrawing" + + "\0221\n\020drawingComponent\030\013 \001(\0132\027.Event.Drawi" + + "ngComponent\022\r\n\005title\030\014 \001(\t\022\016\n\006artist\030\r \001" + + "(\t\022\r\n\005genre\030\016 \001(\t\022\r\n\005level\030\017 \001(\005\022\021\n\tleve" + + "lText\030\020 \001(\t\022\023\n\013wantLevelID\030\021 \001(\t\022\020\n\010auto" + + "Mode\030\022 \001(\005\022\024\n\014noteSaltMode\030\023 \001(\005\022\027\n\017audi" + + "oMultiplier\030\024 \001(\001\022\025\n\rfaintNoteMode\030\025 \001(\005" + + "\022\024\n\014judgmentMode\030\026 \001(\005\022\025\n\rhitPointsMode\030" + + "\027 \001(\005\022\030\n\020noteMobilityMode\030\030 \001(\005\022\024\n\014longN" + + "oteMode\030\031 \001(\005\022\026\n\016inputFavorMode\030\032 \001(\005\022\026\n" + + "\016noteModifyMode\030\033 \001(\005\022\017\n\007bpmMode\030\034 \001(\005\022\020" + + "\n\010waveMode\030\035 \001(\005\022\023\n\013setNoteMode\030\036 \001(\005\022#\n" + + "\033lowestJudgmentConditionMode\030\037 \001(\005\022\022\n\nto" + + "talNotes\030 \001(\005\022\025\n\rjudgmentStage\030! \001(\001\022\026\n" + + "\016hitPointsValue\030\" \001(\001\022\031\n\021highestInputCou" + + "nt\030# \001(\005\022\016\n\006length\030$ \001(\001\022\013\n\003bpm\030% \001(\001\022\022\n" + + "\nmultiplier\030& \001(\001\022\021\n\tinputMode\030\' \001(\005\022\030\n\020" + + "highestJudgment0\030( \001(\001\022\027\n\017higherJudgment" + + "0\030) \001(\001\022\025\n\rhighJudgment0\030* \001(\001\022\024\n\014lowJud" + + "gment0\030+ \001(\001\022\026\n\016lowerJudgment0\030, \001(\001\022\027\n\017" + + "lowestJudgment0\030- \001(\001\022\030\n\020highestJudgment" + + "1\030. \001(\001\022\027\n\017higherJudgment1\030/ \001(\001\022\025\n\rhigh" + + "Judgment1\0300 \001(\001\022\024\n\014lowJudgment1\0301 \001(\001\022\026\n" + + "\016lowerJudgment1\0302 \001(\001\022\027\n\017lowestJudgment1" + + "\0303 \001(\001\022\027\n\017highestJudgment\0304 \001(\005\022\026\n\016highe" + + "rJudgment\0305 \001(\005\022\024\n\014highJudgment\0306 \001(\005\022\023\n" + + "\013lowJudgment\0307 \001(\005\022\025\n\rlowerJudgment\0308 \001(" + + "\005\022\026\n\016lowestJudgment\0309 \001(\005\032\276\001\n\nNetDrawing" + + "\0221\n\016drawingVariety\030\001 \001(\0162\031.Event.NetDraw" + + "ing.Variety\022\r\n\005param\030\002 \001(\r\022\021\n\tposition0\030" + + "\003 \001(\001\022\021\n\tposition1\030\004 \001(\001\022\016\n\006length\030\005 \001(\001" + + "\022\016\n\006height\030\006 \001(\001\"(\n\007Variety\022\010\n\004Note\020\000\022\010\n" + + "\004Main\020\001\022\t\n\005Meter\020\002\032G\n\020DrawingComponent\022\025" + + "\n\rp2BuiltLength\030\001 \001(\002\022\034\n\024judgmentMainPos" + + "ition\030\002 \001(\002\032U\n\017QwilightIOInput\022\021\n\tavatar" + + "IDs\030\001 \003(\t\022\021\n\thandlerID\030\002 \001(\t\022\r\n\005input\030\003 " + + "\001(\005\022\r\n\005power\030\004 \001(\005\032B\n\017TwilightIOInput\022\021\n" + + "\thandlerID\030\001 \001(\t\022\r\n\005input\030\002 \001(\005\022\r\n\005power" + + "\030\003 \001(\005\032W\n\017QwilightIOJudge\022\021\n\tavatarIDs\030\001" + + " \003(\t\022\021\n\thandlerID\030\002 \001(\t\022\016\n\006noteID\030\003 \001(\005\022" + + "\016\n\006judged\030\004 \001(\005\032D\n\017TwilightIOJudge\022\021\n\tha" + + "ndlerID\030\001 \001(\t\022\016\n\006noteID\030\002 \001(\005\022\016\n\006judged\030" + + "\003 \001(\005\032u\n\027QwilightIOJudgmentMeter\022\021\n\tavat" + + "arIDs\030\001 \003(\t\022\021\n\thandlerID\030\002 \001(\t\022\r\n\005input\030" + + "\003 \001(\005\022\025\n\rjudgmentMeter\030\004 \001(\001\022\016\n\006assist\030\005" + + " \001(\005\032b\n\027TwilightIOJudgmentMeter\022\021\n\thandl" + + "erID\030\001 \001(\t\022\r\n\005input\030\002 \001(\005\022\025\n\rjudgmentMet" + + "er\030\003 \001(\001\022\016\n\006assist\030\004 \001(\005\032\204\001\n\030QwilightION" + + "oteVisibility\022\021\n\tavatarIDs\030\001 \003(\t\022\021\n\thand" + + "lerID\030\002 \001(\t\022\016\n\006noteID\030\003 \001(\005\022\033\n\023setValidJ" + + "udgedNotes\030\004 \001(\010\022\025\n\rsetNoteFailed\030\005 \001(\010\032" + + "q\n\030TwilightIONoteVisibility\022\021\n\thandlerID" + + "\030\001 \001(\t\022\016\n\006noteID\030\002 \001(\005\022\033\n\023setValidJudged" + + "Notes\030\003 \001(\010\022\025\n\rsetNoteFailed\030\004 \001(\010\032P\n\024Qw" + + "ilightIOMultiplier\022\021\n\tavatarIDs\030\001 \003(\t\022\021\n" + + "\thandlerID\030\002 \001(\t\022\022\n\nmultiplier\030\003 \001(\001\032=\n\024" + + "TwilightIOMultiplier\022\021\n\thandlerID\030\001 \001(\t\022" + + "\022\n\nmultiplier\030\002 \001(\001\032Z\n\031QwilightIOAudioMu" + + "ltiplier\022\021\n\tavatarIDs\030\001 \003(\t\022\021\n\thandlerID" + + "\030\002 \001(\t\022\027\n\017audioMultiplier\030\003 \001(\001\032G\n\031Twili" + + "ghtIOAudioMultiplier\022\021\n\thandlerID\030\001 \001(\t\022" + + "\027\n\017audioMultiplier\030\002 \001(\001\0326\n\022TwilightAudi" + + "oInput\022\016\n\006siteID\030\001 \001(\t\022\020\n\010avatarID\030\002 \001(\t" + + "\032\206\001\n\020QwilightPostItem\022\016\n\006siteID\030\001 \001(\t\022\021\n" + + "\thandlerID\030\002 \001(\t\022\022\n\npostedItem\030\003 \001(\005\022\022\n\n" + + "isPositive\030\004 \001(\005\022\022\n\nlowestWait\030\005 \001(\001\022\023\n\013" + + "highestWait\030\006 \001(\001\032[\n\020TwilightPostItem\022\021\n" + + "\thandlerID\030\001 \001(\t\022\022\n\npostedItem\030\002 \001(\005\022\022\n\n" + + "avatarName\030\003 \001(\t\022\014\n\004wait\030\004 \001(\001\"5\n\017Avatar" + + "NetStatus\022\013\n\007Default\020\000\022\t\n\005Clear\020\001\022\n\n\006Fai" + + "led\020\002\"\252\r\n\007EventID\022\013\n\007SIGN_IN\020\000\022\017\n\013NOT_SI" + + "GN_IN\020\001\022\013\n\007WARNING\020\002\022\r\n\tSITE_YELL\020\003\022\017\n\013C" + + "ALL_BUNDLE\020\004\022\022\n\016SAVE_AS_BUNDLE\020\005\022\021\n\rSAVI" + + "NG_BUNDLE\020\006\022\017\n\013WIPE_BUNDLE\020\007\022\016\n\nSET_BUND" + + "LE\020\010\022\017\n\013CALL_UBUNTU\020\t\022\024\n\020CALL_SITE_AVATA" + + "R\020\n\022\013\n\007COMMENT\020\013\022\021\n\rSET_SITUATION\020\014\022\r\n\tN" + + "EW_TITLE\020\r\022\026\n\022STOP_SAVING_BUNDLE\020\016\022\020\n\014SA" + + "VED_BUNDLE\020\017\022\017\n\013SAVE_BUNDLE\020\020\022\016\n\nENTER_S" + + "ITE\020\021\022\r\n\tQUIT_SITE\020\022\022\017\n\013WIPE_UBUNTU\020\023\022\014\n" + + "\010NEW_SITE\020\024\022\016\n\nNEW_UBUNTU\020\025\022\020\n\014EXILE_AVA" + + "TAR\020\026\022\023\n\017NEW_SILENT_SITE\020\027\022\r\n\tESTABLISH\020" + + "\030\022\022\n\016CALL_CONFIGURE\020\031\022\021\n\rSET_CONFIGURE\020\032" + + "\022\017\n\013NOTIFY_INFO\020\033\022\014\n\010LEVY_NET\020\034\022\014\n\010COMPI" + + "LED\020\035\022\014\n\010CALL_NET\020\036\022\026\n\022SET_MODE_COMPONEN" + + "T\020\037\022\034\n\030SET_FAVOR_MODE_COMPONENT\020 \022\031\n\025SET" + + "_VALID_HUNTER_MODE\020!\022\032\n\026CALL_NET_SITE_CO" + + "MMENTS\020\"\022\021\n\rSET_NOTE_FILE\020#\022\021\n\rSET_SITE_" + + "NAME\020$\022\021\n\rSET_SITE_HAND\020%\022\014\n\010QUIT_NET\020&\022" + + "\024\n\020SAVING_AS_BUNDLE\020\'\022\023\n\017SAVED_AS_BUNDLE" + + "\020(\022\031\n\025STOP_SAVING_AS_BUNDLE\020)\022\025\n\021SAVE_DE" + + "FAULT_NOTE\020*\022\r\n\tPOST_FILE\020+\022\023\n\017SAVE_DEFA" + + "ULT_UI\020,\022\036\n\032SET_FAVOR_AUDIO_MULTIPLIER\020-" + + "\022\021\n\rCALL_SITE_NET\020.\022\016\n\nNOTIFY_YES\020/\022\013\n\007C" + + "ALL_IO\0200\022\025\n\021CALL_IO_COMPONENT\0201\022\017\n\013COMPI" + + "LED_IO\0202\022\013\n\007LEVY_IO\0203\022\014\n\010IO_INPUT\0204\022\014\n\010I" + + "O_JUDGE\0205\022\026\n\022IO_NOTE_VISIBILITY\0206\022\025\n\021IO_" + + "JUDGMENT_METER\0208\022\021\n\rIO_MULTIPLIER\0209\022\027\n\023I" + + "O_AUDIO_MULTIPLIER\020:\022\014\n\010IO_PAUSE\020;\022\013\n\007IO" + + "_QUIT\020<\022\n\n\006IO_NOT\020=\022\017\n\013AUDIO_INPUT\020>\022\034\n\030" + + "CALL_SITE_MODE_COMPONENT\020?\022\016\n\nCOMMENTARY" + + "\020A\022\r\n\tWWW_LEVEL\020B\022\020\n\014AVATAR_TITLE\020C\022\035\n\031I" + + "NVALIDATE_AVATAR_DRAWING\020D\022\033\n\027INVALIDATE" + + "_AVATAR_TITLE\020E\022\014\n\010LEVEL_UP\020F\022\027\n\023SET_FAV" + + "OR_NOTE_FILE\020G\022\022\n\016GET_SITE_YELLS\020H\022\020\n\014SE" + + "T_LANGUAGE\020I\022\021\n\rVALVE_COMMENT\020J\022\016\n\nABILI" + + "TY_UP\020K\022\t\n\005CLOSE\020L\022\024\n\020UNAVAILABLE_DATE\020M" + + "\022\017\n\013AVATAR_EDGE\020N\022\032\n\026INVALIDATE_AVATAR_E" + + "DGE\020O\022\031\n\025FAILED_VALIDATE_TOTEM\020P\022\024\n\020MODI" + + "FY_SITE_YELL\020Q\022\022\n\016WIPE_SITE_YELL\020R\022\032\n\026AL" + + "READY_LOADING_BUNDLE\020S\022\r\n\tSET_FAVOR\020T\022\026\n" + + "\022SET_AUTO_SITE_HAND\020U\022\024\n\020SET_AVATAR_GROU" + + "P\020V\022\r\n\tPOST_ITEM\020W\022\026\n\022SET_VALID_NET_MODE" + + "\020X\022\036\n\032SET_ALLOWED_POSTABLE_ITEMS\020YB\n\n\010fa" + + "stTextB#\n\nnet.taehuiB\nEventClass\252\002\010Qwili" + + "ghtb\006proto3" + }; + descriptor = com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }); + internal_static_Event_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Event_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_descriptor, + new java.lang.String[] { "Millis", "AvatarID", "EventID", "Text", "Data", "QwilightCallNet", "TwilightCallNet", "QwilightIOInput", "TwilightIOInput", "QwilightIOJudge", "TwilightIOJudge", "QwilightIOJudgmentMeter", "TwilightIOJudgmentMeter", "QwilightIONoteVisibility", "TwilightIONoteVisibility", "QwilightIOMultiplier", "TwilightIOMultiplier", "QwilightIOAudioMultiplier", "TwilightIOAudioMultiplier", "TwilightAudioInput", "QwilightPostItem", "TwilightPostItem", "FastText", }); + internal_static_Event_TwilightCallNet_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(0); + internal_static_Event_TwilightCallNet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightCallNet_descriptor, + new java.lang.String[] { "HandlerID", "Data", }); + internal_static_Event_TwilightCallNet_CallNetItem_descriptor = + internal_static_Event_TwilightCallNet_descriptor.getNestedTypes().get(0); + internal_static_Event_TwilightCallNet_CallNetItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightCallNet_CallNetItem_descriptor, + new java.lang.String[] { "AvatarNetStatus", "AvatarID", "AvatarName", "Stand", "Band", "Point", "HitPoints", "IsFailed", "LastJudged", "HitPointsMode", "TargetPosition", "Drawings", "DrawingComponent", }); + internal_static_Event_QwilightCallNet_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(1); + internal_static_Event_QwilightCallNet_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_QwilightCallNet_descriptor, + new java.lang.String[] { "SiteID", "HandlerID", "AvatarNetStatus", "Stand", "HighestBand", "Point", "HitPoints", "IsFailed", "LastJudged", "Drawings", "DrawingComponent", "Title", "Artist", "Genre", "Level", "LevelText", "WantLevelID", "AutoMode", "NoteSaltMode", "AudioMultiplier", "FaintNoteMode", "JudgmentMode", "HitPointsMode", "NoteMobilityMode", "LongNoteMode", "InputFavorMode", "NoteModifyMode", "BpmMode", "WaveMode", "SetNoteMode", "LowestJudgmentConditionMode", "TotalNotes", "JudgmentStage", "HitPointsValue", "HighestInputCount", "Length", "Bpm", "Multiplier", "InputMode", "HighestJudgment0", "HigherJudgment0", "HighJudgment0", "LowJudgment0", "LowerJudgment0", "LowestJudgment0", "HighestJudgment1", "HigherJudgment1", "HighJudgment1", "LowJudgment1", "LowerJudgment1", "LowestJudgment1", "HighestJudgment", "HigherJudgment", "HighJudgment", "LowJudgment", "LowerJudgment", "LowestJudgment", }); + internal_static_Event_NetDrawing_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(2); + internal_static_Event_NetDrawing_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_NetDrawing_descriptor, + new java.lang.String[] { "DrawingVariety", "Param", "Position0", "Position1", "Length", "Height", }); + internal_static_Event_DrawingComponent_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(3); + internal_static_Event_DrawingComponent_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_DrawingComponent_descriptor, + new java.lang.String[] { "P2BuiltLength", "JudgmentMainPosition", }); + internal_static_Event_QwilightIOInput_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(4); + internal_static_Event_QwilightIOInput_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_QwilightIOInput_descriptor, + new java.lang.String[] { "AvatarIDs", "HandlerID", "Input", "Power", }); + internal_static_Event_TwilightIOInput_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(5); + internal_static_Event_TwilightIOInput_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightIOInput_descriptor, + new java.lang.String[] { "HandlerID", "Input", "Power", }); + internal_static_Event_QwilightIOJudge_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(6); + internal_static_Event_QwilightIOJudge_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_QwilightIOJudge_descriptor, + new java.lang.String[] { "AvatarIDs", "HandlerID", "NoteID", "Judged", }); + internal_static_Event_TwilightIOJudge_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(7); + internal_static_Event_TwilightIOJudge_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightIOJudge_descriptor, + new java.lang.String[] { "HandlerID", "NoteID", "Judged", }); + internal_static_Event_QwilightIOJudgmentMeter_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(8); + internal_static_Event_QwilightIOJudgmentMeter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_QwilightIOJudgmentMeter_descriptor, + new java.lang.String[] { "AvatarIDs", "HandlerID", "Input", "JudgmentMeter", "Assist", }); + internal_static_Event_TwilightIOJudgmentMeter_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(9); + internal_static_Event_TwilightIOJudgmentMeter_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightIOJudgmentMeter_descriptor, + new java.lang.String[] { "HandlerID", "Input", "JudgmentMeter", "Assist", }); + internal_static_Event_QwilightIONoteVisibility_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(10); + internal_static_Event_QwilightIONoteVisibility_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_QwilightIONoteVisibility_descriptor, + new java.lang.String[] { "AvatarIDs", "HandlerID", "NoteID", "SetValidJudgedNotes", "SetNoteFailed", }); + internal_static_Event_TwilightIONoteVisibility_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(11); + internal_static_Event_TwilightIONoteVisibility_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightIONoteVisibility_descriptor, + new java.lang.String[] { "HandlerID", "NoteID", "SetValidJudgedNotes", "SetNoteFailed", }); + internal_static_Event_QwilightIOMultiplier_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(12); + internal_static_Event_QwilightIOMultiplier_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_QwilightIOMultiplier_descriptor, + new java.lang.String[] { "AvatarIDs", "HandlerID", "Multiplier", }); + internal_static_Event_TwilightIOMultiplier_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(13); + internal_static_Event_TwilightIOMultiplier_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightIOMultiplier_descriptor, + new java.lang.String[] { "HandlerID", "Multiplier", }); + internal_static_Event_QwilightIOAudioMultiplier_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(14); + internal_static_Event_QwilightIOAudioMultiplier_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_QwilightIOAudioMultiplier_descriptor, + new java.lang.String[] { "AvatarIDs", "HandlerID", "AudioMultiplier", }); + internal_static_Event_TwilightIOAudioMultiplier_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(15); + internal_static_Event_TwilightIOAudioMultiplier_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightIOAudioMultiplier_descriptor, + new java.lang.String[] { "HandlerID", "AudioMultiplier", }); + internal_static_Event_TwilightAudioInput_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(16); + internal_static_Event_TwilightAudioInput_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightAudioInput_descriptor, + new java.lang.String[] { "SiteID", "AvatarID", }); + internal_static_Event_QwilightPostItem_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(17); + internal_static_Event_QwilightPostItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_QwilightPostItem_descriptor, + new java.lang.String[] { "SiteID", "HandlerID", "PostedItem", "IsPositive", "LowestWait", "HighestWait", }); + internal_static_Event_TwilightPostItem_descriptor = + internal_static_Event_descriptor.getNestedTypes().get(18); + internal_static_Event_TwilightPostItem_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Event_TwilightPostItem_descriptor, + new java.lang.String[] { "HandlerID", "PostedItem", "AvatarName", "Wait", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/src/main/kotlin/META-INF/MANIFEST.MF b/src/main/kotlin/META-INF/MANIFEST.MF new file mode 100644 index 0000000..9243fc2 --- /dev/null +++ b/src/main/kotlin/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Main-Class: net.taehui.twilight.Twilight + diff --git a/src/main/kotlin/net/taehui/AudioMultiplierEventKt.kt b/src/main/kotlin/net/taehui/AudioMultiplierEventKt.kt new file mode 100644 index 0000000..d8bb79c --- /dev/null +++ b/src/main/kotlin/net/taehui/AudioMultiplierEventKt.kt @@ -0,0 +1,68 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Comment.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + +@kotlin.jvm.JvmName("-initializeaudioMultiplierEvent") +public inline fun audioMultiplierEvent(block: net.taehui.AudioMultiplierEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.AudioMultiplierEvent = + net.taehui.AudioMultiplierEventKt.Dsl._create(net.taehui.CommentClass.AudioMultiplierEvent.newBuilder()).apply { block() }._build() +/** + * Protobuf type `AudioMultiplierEvent` + */ +public object AudioMultiplierEventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.CommentClass.AudioMultiplierEvent.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.CommentClass.AudioMultiplierEvent.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.CommentClass.AudioMultiplierEvent = _builder.build() + + /** + * `double audioMultiplier = 1;` + */ + public var audioMultiplier: kotlin.Double + @JvmName("getAudioMultiplier") + get() = _builder.getAudioMultiplier() + @JvmName("setAudioMultiplier") + set(value) { + _builder.setAudioMultiplier(value) + } + /** + * `double audioMultiplier = 1;` + */ + public fun clearAudioMultiplier() { + _builder.clearAudioMultiplier() + } + + /** + * `double wait = 2;` + */ + public var wait: kotlin.Double + @JvmName("getWait") + get() = _builder.getWait() + @JvmName("setWait") + set(value) { + _builder.setWait(value) + } + /** + * `double wait = 2;` + */ + public fun clearWait() { + _builder.clearWait() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.CommentClass.AudioMultiplierEvent.copy(block: `net.taehui`.AudioMultiplierEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.AudioMultiplierEvent = + `net.taehui`.AudioMultiplierEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/src/main/kotlin/net/taehui/CommentClassKt.kt b/src/main/kotlin/net/taehui/CommentClassKt.kt new file mode 100644 index 0000000..845a651 --- /dev/null +++ b/src/main/kotlin/net/taehui/CommentClassKt.kt @@ -0,0 +1,7 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Comment.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + diff --git a/src/main/kotlin/net/taehui/CommentKt.kt b/src/main/kotlin/net/taehui/CommentKt.kt new file mode 100644 index 0000000..1f9ef5a --- /dev/null +++ b/src/main/kotlin/net/taehui/CommentKt.kt @@ -0,0 +1,564 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Comment.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + +@kotlin.jvm.JvmName("-initializecomment") +public inline fun comment(block: net.taehui.CommentKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.Comment = + net.taehui.CommentKt.Dsl._create(net.taehui.CommentClass.Comment.newBuilder()).apply { block() }._build() +/** + * Protobuf type `Comment` + */ +public object CommentKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.CommentClass.Comment.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.CommentClass.Comment.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.CommentClass.Comment = _builder.build() + + /** + * `string date = 1;` + */ + public var date: kotlin.String + @JvmName("getDate") + get() = _builder.getDate() + @JvmName("setDate") + set(value) { + _builder.setDate(value) + } + /** + * `string date = 1;` + */ + public fun clearDate() { + _builder.clearDate() + } + + /** + * `int32 highestJudgment = 2;` + */ + public var highestJudgment: kotlin.Int + @JvmName("getHighestJudgment") + get() = _builder.getHighestJudgment() + @JvmName("setHighestJudgment") + set(value) { + _builder.setHighestJudgment(value) + } + /** + * `int32 highestJudgment = 2;` + */ + public fun clearHighestJudgment() { + _builder.clearHighestJudgment() + } + + /** + * `int32 higherJudgment = 3;` + */ + public var higherJudgment: kotlin.Int + @JvmName("getHigherJudgment") + get() = _builder.getHigherJudgment() + @JvmName("setHigherJudgment") + set(value) { + _builder.setHigherJudgment(value) + } + /** + * `int32 higherJudgment = 3;` + */ + public fun clearHigherJudgment() { + _builder.clearHigherJudgment() + } + + /** + * `int32 highJudgment = 4;` + */ + public var highJudgment: kotlin.Int + @JvmName("getHighJudgment") + get() = _builder.getHighJudgment() + @JvmName("setHighJudgment") + set(value) { + _builder.setHighJudgment(value) + } + /** + * `int32 highJudgment = 4;` + */ + public fun clearHighJudgment() { + _builder.clearHighJudgment() + } + + /** + * `int32 lowJudgment = 5;` + */ + public var lowJudgment: kotlin.Int + @JvmName("getLowJudgment") + get() = _builder.getLowJudgment() + @JvmName("setLowJudgment") + set(value) { + _builder.setLowJudgment(value) + } + /** + * `int32 lowJudgment = 5;` + */ + public fun clearLowJudgment() { + _builder.clearLowJudgment() + } + + /** + * `int32 lowerJudgment = 6;` + */ + public var lowerJudgment: kotlin.Int + @JvmName("getLowerJudgment") + get() = _builder.getLowerJudgment() + @JvmName("setLowerJudgment") + set(value) { + _builder.setLowerJudgment(value) + } + /** + * `int32 lowerJudgment = 6;` + */ + public fun clearLowerJudgment() { + _builder.clearLowerJudgment() + } + + /** + * `int32 lowestJudgment = 7;` + */ + public var lowestJudgment: kotlin.Int + @JvmName("getLowestJudgment") + get() = _builder.getLowestJudgment() + @JvmName("setLowestJudgment") + set(value) { + _builder.setLowestJudgment(value) + } + /** + * `int32 lowestJudgment = 7;` + */ + public fun clearLowestJudgment() { + _builder.clearLowestJudgment() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class InputsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .InputEvent inputs = 8;` + */ + public val inputs: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getInputsList() + ) + /** + * `repeated .InputEvent inputs = 8;` + * @param value The inputs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addInputs") + public fun com.google.protobuf.kotlin.DslList.add(value: net.taehui.CommentClass.InputEvent) { + _builder.addInputs(value) + } + /** + * `repeated .InputEvent inputs = 8;` + * @param value The inputs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignInputs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.taehui.CommentClass.InputEvent) { + add(value) + } + /** + * `repeated .InputEvent inputs = 8;` + * @param values The inputs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllInputs") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllInputs(values) + } + /** + * `repeated .InputEvent inputs = 8;` + * @param values The inputs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllInputs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .InputEvent inputs = 8;` + * @param index The index to set the value at. + * @param value The inputs to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setInputs") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.taehui.CommentClass.InputEvent) { + _builder.setInputs(index, value) + } + /** + * `repeated .InputEvent inputs = 8;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearInputs") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearInputs() + } + + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class MultipliersProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .MultiplierEvent multipliers = 9;` + */ + public val multipliers: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getMultipliersList() + ) + /** + * `repeated .MultiplierEvent multipliers = 9;` + * @param value The multipliers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addMultipliers") + public fun com.google.protobuf.kotlin.DslList.add(value: net.taehui.CommentClass.MultiplierEvent) { + _builder.addMultipliers(value) + } + /** + * `repeated .MultiplierEvent multipliers = 9;` + * @param value The multipliers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignMultipliers") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.taehui.CommentClass.MultiplierEvent) { + add(value) + } + /** + * `repeated .MultiplierEvent multipliers = 9;` + * @param values The multipliers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllMultipliers") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllMultipliers(values) + } + /** + * `repeated .MultiplierEvent multipliers = 9;` + * @param values The multipliers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllMultipliers") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .MultiplierEvent multipliers = 9;` + * @param index The index to set the value at. + * @param value The multipliers to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setMultipliers") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.taehui.CommentClass.MultiplierEvent) { + _builder.setMultipliers(index, value) + } + /** + * `repeated .MultiplierEvent multipliers = 9;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearMultipliers") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearMultipliers() + } + + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class PaintsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .PaintEvent paints = 10;` + */ + public val paints: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getPaintsList() + ) + /** + * `repeated .PaintEvent paints = 10;` + * @param value The paints to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addPaints") + public fun com.google.protobuf.kotlin.DslList.add(value: net.taehui.CommentClass.PaintEvent) { + _builder.addPaints(value) + } + /** + * `repeated .PaintEvent paints = 10;` + * @param value The paints to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignPaints") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.taehui.CommentClass.PaintEvent) { + add(value) + } + /** + * `repeated .PaintEvent paints = 10;` + * @param values The paints to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllPaints") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllPaints(values) + } + /** + * `repeated .PaintEvent paints = 10;` + * @param values The paints to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllPaints") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .PaintEvent paints = 10;` + * @param index The index to set the value at. + * @param value The paints to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setPaints") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.taehui.CommentClass.PaintEvent) { + _builder.setPaints(index, value) + } + /** + * `repeated .PaintEvent paints = 10;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearPaints") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearPaints() + } + + + /** + * `int32 loopUnit = 11;` + */ + public var loopUnit: kotlin.Int + @JvmName("getLoopUnit") + get() = _builder.getLoopUnit() + @JvmName("setLoopUnit") + set(value) { + _builder.setLoopUnit(value) + } + /** + * `int32 loopUnit = 11;` + */ + public fun clearLoopUnit() { + _builder.clearLoopUnit() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class JudgmentMetersProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .JudgmentMeterEvent judgmentMeters = 12;` + */ + public val judgmentMeters: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getJudgmentMetersList() + ) + /** + * `repeated .JudgmentMeterEvent judgmentMeters = 12;` + * @param value The judgmentMeters to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addJudgmentMeters") + public fun com.google.protobuf.kotlin.DslList.add(value: net.taehui.CommentClass.JudgmentMeterEvent) { + _builder.addJudgmentMeters(value) + } + /** + * `repeated .JudgmentMeterEvent judgmentMeters = 12;` + * @param value The judgmentMeters to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignJudgmentMeters") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.taehui.CommentClass.JudgmentMeterEvent) { + add(value) + } + /** + * `repeated .JudgmentMeterEvent judgmentMeters = 12;` + * @param values The judgmentMeters to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllJudgmentMeters") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllJudgmentMeters(values) + } + /** + * `repeated .JudgmentMeterEvent judgmentMeters = 12;` + * @param values The judgmentMeters to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllJudgmentMeters") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .JudgmentMeterEvent judgmentMeters = 12;` + * @param index The index to set the value at. + * @param value The judgmentMeters to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setJudgmentMeters") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.taehui.CommentClass.JudgmentMeterEvent) { + _builder.setJudgmentMeters(index, value) + } + /** + * `repeated .JudgmentMeterEvent judgmentMeters = 12;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearJudgmentMeters") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearJudgmentMeters() + } + + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class AudioMultipliersProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .AudioMultiplierEvent audioMultipliers = 13;` + */ + public val audioMultipliers: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getAudioMultipliersList() + ) + /** + * `repeated .AudioMultiplierEvent audioMultipliers = 13;` + * @param value The audioMultipliers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAudioMultipliers") + public fun com.google.protobuf.kotlin.DslList.add(value: net.taehui.CommentClass.AudioMultiplierEvent) { + _builder.addAudioMultipliers(value) + } + /** + * `repeated .AudioMultiplierEvent audioMultipliers = 13;` + * @param value The audioMultipliers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAudioMultipliers") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.taehui.CommentClass.AudioMultiplierEvent) { + add(value) + } + /** + * `repeated .AudioMultiplierEvent audioMultipliers = 13;` + * @param values The audioMultipliers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllAudioMultipliers") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllAudioMultipliers(values) + } + /** + * `repeated .AudioMultiplierEvent audioMultipliers = 13;` + * @param values The audioMultipliers to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllAudioMultipliers") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .AudioMultiplierEvent audioMultipliers = 13;` + * @param index The index to set the value at. + * @param value The audioMultipliers to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setAudioMultipliers") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.taehui.CommentClass.AudioMultiplierEvent) { + _builder.setAudioMultipliers(index, value) + } + /** + * `repeated .AudioMultiplierEvent audioMultipliers = 13;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearAudioMultipliers") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearAudioMultipliers() + } + + + /** + * `double levyingMultiplier = 14;` + */ + public var levyingMultiplier: kotlin.Double + @JvmName("getLevyingMultiplier") + get() = _builder.getLevyingMultiplier() + @JvmName("setLevyingMultiplier") + set(value) { + _builder.setLevyingMultiplier(value) + } + /** + * `double levyingMultiplier = 14;` + */ + public fun clearLevyingMultiplier() { + _builder.clearLevyingMultiplier() + } + + /** + * `double levyingAudioMultiplier = 15;` + */ + public var levyingAudioMultiplier: kotlin.Double + @JvmName("getLevyingAudioMultiplier") + get() = _builder.getLevyingAudioMultiplier() + @JvmName("setLevyingAudioMultiplier") + set(value) { + _builder.setLevyingAudioMultiplier(value) + } + /** + * `double levyingAudioMultiplier = 15;` + */ + public fun clearLevyingAudioMultiplier() { + _builder.clearLevyingAudioMultiplier() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.CommentClass.Comment.copy(block: `net.taehui`.CommentKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.Comment = + `net.taehui`.CommentKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/src/main/kotlin/net/taehui/EventClassKt.kt b/src/main/kotlin/net/taehui/EventClassKt.kt new file mode 100644 index 0000000..6cfd074 --- /dev/null +++ b/src/main/kotlin/net/taehui/EventClassKt.kt @@ -0,0 +1,7 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Event.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + diff --git a/src/main/kotlin/net/taehui/EventKt.kt b/src/main/kotlin/net/taehui/EventKt.kt new file mode 100644 index 0000000..b566b78 --- /dev/null +++ b/src/main/kotlin/net/taehui/EventKt.kt @@ -0,0 +1,3982 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Event.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + +@kotlin.jvm.JvmName("-initializeevent") +public inline fun event(block: net.taehui.EventKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event = + net.taehui.EventKt.Dsl._create(net.taehui.EventClass.Event.newBuilder()).apply { block() }._build() +/** + * Protobuf type `Event` + */ +public object EventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event = _builder.build() + + /** + * `int64 millis = 1;` + */ + public var millis: kotlin.Long + @JvmName("getMillis") + get() = _builder.getMillis() + @JvmName("setMillis") + set(value) { + _builder.setMillis(value) + } + /** + * `int64 millis = 1;` + */ + public fun clearMillis() { + _builder.clearMillis() + } + + /** + * `string avatarID = 2;` + */ + public var avatarID: kotlin.String + @JvmName("getAvatarID") + get() = _builder.getAvatarID() + @JvmName("setAvatarID") + set(value) { + _builder.setAvatarID(value) + } + /** + * `string avatarID = 2;` + */ + public fun clearAvatarID() { + _builder.clearAvatarID() + } + + /** + * `.Event.EventID eventID = 3;` + */ + public var eventID: net.taehui.EventClass.Event.EventID + @JvmName("getEventID") + get() = _builder.getEventID() + @JvmName("setEventID") + set(value) { + _builder.setEventID(value) + } + public var eventIDValue: kotlin.Int + @JvmName("getEventIDValue") + get() = _builder.getEventIDValue() + @JvmName("setEventIDValue") + set(value) { + _builder.setEventIDValue(value) + } + /** + * `.Event.EventID eventID = 3;` + */ + public fun clearEventID() { + _builder.clearEventID() + } + + /** + * `string text = 4;` + */ + public var text: kotlin.String + @JvmName("getText") + get() = _builder.getText() + @JvmName("setText") + set(value) { + _builder.setText(value) + } + /** + * `string text = 4;` + */ + public fun clearText() { + _builder.clearText() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class DataProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated bytes data = 5;` + */ + public val data: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getDataList() + ) + /** + * `repeated bytes data = 5;` + * @param value The data to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addData") + public fun com.google.protobuf.kotlin.DslList.add(value: com.google.protobuf.ByteString) { + _builder.addData(value) + }/** + * `repeated bytes data = 5;` + * @param value The data to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignData") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: com.google.protobuf.ByteString) { + add(value) + }/** + * `repeated bytes data = 5;` + * @param values The data to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllData") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllData(values) + }/** + * `repeated bytes data = 5;` + * @param values The data to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllData") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + }/** + * `repeated bytes data = 5;` + * @param index The index to set the value at. + * @param value The data to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setData") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: com.google.protobuf.ByteString) { + _builder.setData(index, value) + }/** + * `repeated bytes data = 5;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearData") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearData() + } + /** + * `.Event.QwilightCallNet qwilightCallNet = 6;` + */ + public var qwilightCallNet: net.taehui.EventClass.Event.QwilightCallNet + @JvmName("getQwilightCallNet") + get() = _builder.getQwilightCallNet() + @JvmName("setQwilightCallNet") + set(value) { + _builder.setQwilightCallNet(value) + } + /** + * `.Event.QwilightCallNet qwilightCallNet = 6;` + */ + public fun clearQwilightCallNet() { + _builder.clearQwilightCallNet() + } + /** + * `.Event.QwilightCallNet qwilightCallNet = 6;` + * @return Whether the qwilightCallNet field is set. + */ + public fun hasQwilightCallNet(): kotlin.Boolean { + return _builder.hasQwilightCallNet() + } + + /** + * `.Event.TwilightCallNet twilightCallNet = 7;` + */ + public var twilightCallNet: net.taehui.EventClass.Event.TwilightCallNet + @JvmName("getTwilightCallNet") + get() = _builder.getTwilightCallNet() + @JvmName("setTwilightCallNet") + set(value) { + _builder.setTwilightCallNet(value) + } + /** + * `.Event.TwilightCallNet twilightCallNet = 7;` + */ + public fun clearTwilightCallNet() { + _builder.clearTwilightCallNet() + } + /** + * `.Event.TwilightCallNet twilightCallNet = 7;` + * @return Whether the twilightCallNet field is set. + */ + public fun hasTwilightCallNet(): kotlin.Boolean { + return _builder.hasTwilightCallNet() + } + + /** + * `.Event.QwilightIOInput qwilightIOInput = 8;` + */ + public var qwilightIOInput: net.taehui.EventClass.Event.QwilightIOInput + @JvmName("getQwilightIOInput") + get() = _builder.getQwilightIOInput() + @JvmName("setQwilightIOInput") + set(value) { + _builder.setQwilightIOInput(value) + } + /** + * `.Event.QwilightIOInput qwilightIOInput = 8;` + */ + public fun clearQwilightIOInput() { + _builder.clearQwilightIOInput() + } + /** + * `.Event.QwilightIOInput qwilightIOInput = 8;` + * @return Whether the qwilightIOInput field is set. + */ + public fun hasQwilightIOInput(): kotlin.Boolean { + return _builder.hasQwilightIOInput() + } + + /** + * `.Event.TwilightIOInput twilightIOInput = 9;` + */ + public var twilightIOInput: net.taehui.EventClass.Event.TwilightIOInput + @JvmName("getTwilightIOInput") + get() = _builder.getTwilightIOInput() + @JvmName("setTwilightIOInput") + set(value) { + _builder.setTwilightIOInput(value) + } + /** + * `.Event.TwilightIOInput twilightIOInput = 9;` + */ + public fun clearTwilightIOInput() { + _builder.clearTwilightIOInput() + } + /** + * `.Event.TwilightIOInput twilightIOInput = 9;` + * @return Whether the twilightIOInput field is set. + */ + public fun hasTwilightIOInput(): kotlin.Boolean { + return _builder.hasTwilightIOInput() + } + + /** + * `.Event.QwilightIOJudge qwilightIOJudge = 10;` + */ + public var qwilightIOJudge: net.taehui.EventClass.Event.QwilightIOJudge + @JvmName("getQwilightIOJudge") + get() = _builder.getQwilightIOJudge() + @JvmName("setQwilightIOJudge") + set(value) { + _builder.setQwilightIOJudge(value) + } + /** + * `.Event.QwilightIOJudge qwilightIOJudge = 10;` + */ + public fun clearQwilightIOJudge() { + _builder.clearQwilightIOJudge() + } + /** + * `.Event.QwilightIOJudge qwilightIOJudge = 10;` + * @return Whether the qwilightIOJudge field is set. + */ + public fun hasQwilightIOJudge(): kotlin.Boolean { + return _builder.hasQwilightIOJudge() + } + + /** + * `.Event.TwilightIOJudge twilightIOJudge = 11;` + */ + public var twilightIOJudge: net.taehui.EventClass.Event.TwilightIOJudge + @JvmName("getTwilightIOJudge") + get() = _builder.getTwilightIOJudge() + @JvmName("setTwilightIOJudge") + set(value) { + _builder.setTwilightIOJudge(value) + } + /** + * `.Event.TwilightIOJudge twilightIOJudge = 11;` + */ + public fun clearTwilightIOJudge() { + _builder.clearTwilightIOJudge() + } + /** + * `.Event.TwilightIOJudge twilightIOJudge = 11;` + * @return Whether the twilightIOJudge field is set. + */ + public fun hasTwilightIOJudge(): kotlin.Boolean { + return _builder.hasTwilightIOJudge() + } + + /** + * `.Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12;` + */ + public var qwilightIOJudgmentMeter: net.taehui.EventClass.Event.QwilightIOJudgmentMeter + @JvmName("getQwilightIOJudgmentMeter") + get() = _builder.getQwilightIOJudgmentMeter() + @JvmName("setQwilightIOJudgmentMeter") + set(value) { + _builder.setQwilightIOJudgmentMeter(value) + } + /** + * `.Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12;` + */ + public fun clearQwilightIOJudgmentMeter() { + _builder.clearQwilightIOJudgmentMeter() + } + /** + * `.Event.QwilightIOJudgmentMeter qwilightIOJudgmentMeter = 12;` + * @return Whether the qwilightIOJudgmentMeter field is set. + */ + public fun hasQwilightIOJudgmentMeter(): kotlin.Boolean { + return _builder.hasQwilightIOJudgmentMeter() + } + + /** + * `.Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13;` + */ + public var twilightIOJudgmentMeter: net.taehui.EventClass.Event.TwilightIOJudgmentMeter + @JvmName("getTwilightIOJudgmentMeter") + get() = _builder.getTwilightIOJudgmentMeter() + @JvmName("setTwilightIOJudgmentMeter") + set(value) { + _builder.setTwilightIOJudgmentMeter(value) + } + /** + * `.Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13;` + */ + public fun clearTwilightIOJudgmentMeter() { + _builder.clearTwilightIOJudgmentMeter() + } + /** + * `.Event.TwilightIOJudgmentMeter twilightIOJudgmentMeter = 13;` + * @return Whether the twilightIOJudgmentMeter field is set. + */ + public fun hasTwilightIOJudgmentMeter(): kotlin.Boolean { + return _builder.hasTwilightIOJudgmentMeter() + } + + /** + * `.Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14;` + */ + public var qwilightIONoteVisibility: net.taehui.EventClass.Event.QwilightIONoteVisibility + @JvmName("getQwilightIONoteVisibility") + get() = _builder.getQwilightIONoteVisibility() + @JvmName("setQwilightIONoteVisibility") + set(value) { + _builder.setQwilightIONoteVisibility(value) + } + /** + * `.Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14;` + */ + public fun clearQwilightIONoteVisibility() { + _builder.clearQwilightIONoteVisibility() + } + /** + * `.Event.QwilightIONoteVisibility qwilightIONoteVisibility = 14;` + * @return Whether the qwilightIONoteVisibility field is set. + */ + public fun hasQwilightIONoteVisibility(): kotlin.Boolean { + return _builder.hasQwilightIONoteVisibility() + } + + /** + * `.Event.TwilightIONoteVisibility twilightIONoteVisibility = 15;` + */ + public var twilightIONoteVisibility: net.taehui.EventClass.Event.TwilightIONoteVisibility + @JvmName("getTwilightIONoteVisibility") + get() = _builder.getTwilightIONoteVisibility() + @JvmName("setTwilightIONoteVisibility") + set(value) { + _builder.setTwilightIONoteVisibility(value) + } + /** + * `.Event.TwilightIONoteVisibility twilightIONoteVisibility = 15;` + */ + public fun clearTwilightIONoteVisibility() { + _builder.clearTwilightIONoteVisibility() + } + /** + * `.Event.TwilightIONoteVisibility twilightIONoteVisibility = 15;` + * @return Whether the twilightIONoteVisibility field is set. + */ + public fun hasTwilightIONoteVisibility(): kotlin.Boolean { + return _builder.hasTwilightIONoteVisibility() + } + + /** + * `.Event.QwilightIOMultiplier qwilightIOMultiplier = 16;` + */ + public var qwilightIOMultiplier: net.taehui.EventClass.Event.QwilightIOMultiplier + @JvmName("getQwilightIOMultiplier") + get() = _builder.getQwilightIOMultiplier() + @JvmName("setQwilightIOMultiplier") + set(value) { + _builder.setQwilightIOMultiplier(value) + } + /** + * `.Event.QwilightIOMultiplier qwilightIOMultiplier = 16;` + */ + public fun clearQwilightIOMultiplier() { + _builder.clearQwilightIOMultiplier() + } + /** + * `.Event.QwilightIOMultiplier qwilightIOMultiplier = 16;` + * @return Whether the qwilightIOMultiplier field is set. + */ + public fun hasQwilightIOMultiplier(): kotlin.Boolean { + return _builder.hasQwilightIOMultiplier() + } + + /** + * `.Event.TwilightIOMultiplier twilightIOMultiplier = 17;` + */ + public var twilightIOMultiplier: net.taehui.EventClass.Event.TwilightIOMultiplier + @JvmName("getTwilightIOMultiplier") + get() = _builder.getTwilightIOMultiplier() + @JvmName("setTwilightIOMultiplier") + set(value) { + _builder.setTwilightIOMultiplier(value) + } + /** + * `.Event.TwilightIOMultiplier twilightIOMultiplier = 17;` + */ + public fun clearTwilightIOMultiplier() { + _builder.clearTwilightIOMultiplier() + } + /** + * `.Event.TwilightIOMultiplier twilightIOMultiplier = 17;` + * @return Whether the twilightIOMultiplier field is set. + */ + public fun hasTwilightIOMultiplier(): kotlin.Boolean { + return _builder.hasTwilightIOMultiplier() + } + + /** + * `.Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18;` + */ + public var qwilightIOAudioMultiplier: net.taehui.EventClass.Event.QwilightIOAudioMultiplier + @JvmName("getQwilightIOAudioMultiplier") + get() = _builder.getQwilightIOAudioMultiplier() + @JvmName("setQwilightIOAudioMultiplier") + set(value) { + _builder.setQwilightIOAudioMultiplier(value) + } + /** + * `.Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18;` + */ + public fun clearQwilightIOAudioMultiplier() { + _builder.clearQwilightIOAudioMultiplier() + } + /** + * `.Event.QwilightIOAudioMultiplier qwilightIOAudioMultiplier = 18;` + * @return Whether the qwilightIOAudioMultiplier field is set. + */ + public fun hasQwilightIOAudioMultiplier(): kotlin.Boolean { + return _builder.hasQwilightIOAudioMultiplier() + } + + /** + * `.Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19;` + */ + public var twilightIOAudioMultiplier: net.taehui.EventClass.Event.TwilightIOAudioMultiplier + @JvmName("getTwilightIOAudioMultiplier") + get() = _builder.getTwilightIOAudioMultiplier() + @JvmName("setTwilightIOAudioMultiplier") + set(value) { + _builder.setTwilightIOAudioMultiplier(value) + } + /** + * `.Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19;` + */ + public fun clearTwilightIOAudioMultiplier() { + _builder.clearTwilightIOAudioMultiplier() + } + /** + * `.Event.TwilightIOAudioMultiplier twilightIOAudioMultiplier = 19;` + * @return Whether the twilightIOAudioMultiplier field is set. + */ + public fun hasTwilightIOAudioMultiplier(): kotlin.Boolean { + return _builder.hasTwilightIOAudioMultiplier() + } + + /** + * `.Event.TwilightAudioInput twilightAudioInput = 20;` + */ + public var twilightAudioInput: net.taehui.EventClass.Event.TwilightAudioInput + @JvmName("getTwilightAudioInput") + get() = _builder.getTwilightAudioInput() + @JvmName("setTwilightAudioInput") + set(value) { + _builder.setTwilightAudioInput(value) + } + /** + * `.Event.TwilightAudioInput twilightAudioInput = 20;` + */ + public fun clearTwilightAudioInput() { + _builder.clearTwilightAudioInput() + } + /** + * `.Event.TwilightAudioInput twilightAudioInput = 20;` + * @return Whether the twilightAudioInput field is set. + */ + public fun hasTwilightAudioInput(): kotlin.Boolean { + return _builder.hasTwilightAudioInput() + } + + /** + * `.Event.QwilightPostItem qwilightPostItem = 21;` + */ + public var qwilightPostItem: net.taehui.EventClass.Event.QwilightPostItem + @JvmName("getQwilightPostItem") + get() = _builder.getQwilightPostItem() + @JvmName("setQwilightPostItem") + set(value) { + _builder.setQwilightPostItem(value) + } + /** + * `.Event.QwilightPostItem qwilightPostItem = 21;` + */ + public fun clearQwilightPostItem() { + _builder.clearQwilightPostItem() + } + /** + * `.Event.QwilightPostItem qwilightPostItem = 21;` + * @return Whether the qwilightPostItem field is set. + */ + public fun hasQwilightPostItem(): kotlin.Boolean { + return _builder.hasQwilightPostItem() + } + + /** + * `.Event.TwilightPostItem twilightPostItem = 22;` + */ + public var twilightPostItem: net.taehui.EventClass.Event.TwilightPostItem + @JvmName("getTwilightPostItem") + get() = _builder.getTwilightPostItem() + @JvmName("setTwilightPostItem") + set(value) { + _builder.setTwilightPostItem(value) + } + /** + * `.Event.TwilightPostItem twilightPostItem = 22;` + */ + public fun clearTwilightPostItem() { + _builder.clearTwilightPostItem() + } + /** + * `.Event.TwilightPostItem twilightPostItem = 22;` + * @return Whether the twilightPostItem field is set. + */ + public fun hasTwilightPostItem(): kotlin.Boolean { + return _builder.hasTwilightPostItem() + } + public val fastTextCase: net.taehui.EventClass.Event.FastTextCase + @JvmName("getFastTextCase") + get() = _builder.getFastTextCase() + + public fun clearFastText() { + _builder.clearFastText() + } + } + @kotlin.jvm.JvmName("-initializetwilightCallNet") + public inline fun twilightCallNet(block: net.taehui.EventKt.TwilightCallNetKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightCallNet = + net.taehui.EventKt.TwilightCallNetKt.Dsl._create(net.taehui.EventClass.Event.TwilightCallNet.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightCallNet` + */ + public object TwilightCallNetKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightCallNet.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightCallNet.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightCallNet = _builder.build() + + /** + * `string handlerID = 1;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 1;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class DataProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .Event.TwilightCallNet.CallNetItem data = 2;` + */ + public val data: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getDataList() + ) + /** + * `repeated .Event.TwilightCallNet.CallNetItem data = 2;` + * @param value The data to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addData") + public fun com.google.protobuf.kotlin.DslList.add(value: net.taehui.EventClass.Event.TwilightCallNet.CallNetItem) { + _builder.addData(value) + } + /** + * `repeated .Event.TwilightCallNet.CallNetItem data = 2;` + * @param value The data to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignData") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.taehui.EventClass.Event.TwilightCallNet.CallNetItem) { + add(value) + } + /** + * `repeated .Event.TwilightCallNet.CallNetItem data = 2;` + * @param values The data to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllData") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllData(values) + } + /** + * `repeated .Event.TwilightCallNet.CallNetItem data = 2;` + * @param values The data to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllData") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .Event.TwilightCallNet.CallNetItem data = 2;` + * @param index The index to set the value at. + * @param value The data to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setData") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.taehui.EventClass.Event.TwilightCallNet.CallNetItem) { + _builder.setData(index, value) + } + /** + * `repeated .Event.TwilightCallNet.CallNetItem data = 2;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearData") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearData() + } + + } + @kotlin.jvm.JvmName("-initializecallNetItem") + public inline fun callNetItem(block: net.taehui.EventKt.TwilightCallNetKt.CallNetItemKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightCallNet.CallNetItem = + net.taehui.EventKt.TwilightCallNetKt.CallNetItemKt.Dsl._create(net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightCallNet.CallNetItem` + */ + public object CallNetItemKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightCallNet.CallNetItem = _builder.build() + + /** + * `.Event.AvatarNetStatus avatarNetStatus = 1;` + */ + public var avatarNetStatus: net.taehui.EventClass.Event.AvatarNetStatus + @JvmName("getAvatarNetStatus") + get() = _builder.getAvatarNetStatus() + @JvmName("setAvatarNetStatus") + set(value) { + _builder.setAvatarNetStatus(value) + } + public var avatarNetStatusValue: kotlin.Int + @JvmName("getAvatarNetStatusValue") + get() = _builder.getAvatarNetStatusValue() + @JvmName("setAvatarNetStatusValue") + set(value) { + _builder.setAvatarNetStatusValue(value) + } + /** + * `.Event.AvatarNetStatus avatarNetStatus = 1;` + */ + public fun clearAvatarNetStatus() { + _builder.clearAvatarNetStatus() + } + + /** + * `string avatarID = 2;` + */ + public var avatarID: kotlin.String + @JvmName("getAvatarID") + get() = _builder.getAvatarID() + @JvmName("setAvatarID") + set(value) { + _builder.setAvatarID(value) + } + /** + * `string avatarID = 2;` + */ + public fun clearAvatarID() { + _builder.clearAvatarID() + } + + /** + * `string avatarName = 3;` + */ + public var avatarName: kotlin.String + @JvmName("getAvatarName") + get() = _builder.getAvatarName() + @JvmName("setAvatarName") + set(value) { + _builder.setAvatarName(value) + } + /** + * `string avatarName = 3;` + */ + public fun clearAvatarName() { + _builder.clearAvatarName() + } + + /** + * `int32 stand = 4;` + */ + public var stand: kotlin.Int + @JvmName("getStand") + get() = _builder.getStand() + @JvmName("setStand") + set(value) { + _builder.setStand(value) + } + /** + * `int32 stand = 4;` + */ + public fun clearStand() { + _builder.clearStand() + } + + /** + * `int32 band = 5;` + */ + public var band: kotlin.Int + @JvmName("getBand") + get() = _builder.getBand() + @JvmName("setBand") + set(value) { + _builder.setBand(value) + } + /** + * `int32 band = 5;` + */ + public fun clearBand() { + _builder.clearBand() + } + + /** + * `double point = 6;` + */ + public var point: kotlin.Double + @JvmName("getPoint") + get() = _builder.getPoint() + @JvmName("setPoint") + set(value) { + _builder.setPoint(value) + } + /** + * `double point = 6;` + */ + public fun clearPoint() { + _builder.clearPoint() + } + + /** + * `double hitPoints = 7;` + */ + public var hitPoints: kotlin.Double + @JvmName("getHitPoints") + get() = _builder.getHitPoints() + @JvmName("setHitPoints") + set(value) { + _builder.setHitPoints(value) + } + /** + * `double hitPoints = 7;` + */ + public fun clearHitPoints() { + _builder.clearHitPoints() + } + + /** + * `bool isFailed = 8;` + */ + public var isFailed: kotlin.Boolean + @JvmName("getIsFailed") + get() = _builder.getIsFailed() + @JvmName("setIsFailed") + set(value) { + _builder.setIsFailed(value) + } + /** + * `bool isFailed = 8;` + */ + public fun clearIsFailed() { + _builder.clearIsFailed() + } + + /** + * `int32 lastJudged = 9;` + */ + public var lastJudged: kotlin.Int + @JvmName("getLastJudged") + get() = _builder.getLastJudged() + @JvmName("setLastJudged") + set(value) { + _builder.setLastJudged(value) + } + /** + * `int32 lastJudged = 9;` + */ + public fun clearLastJudged() { + _builder.clearLastJudged() + } + + /** + * `int32 hitPointsMode = 10;` + */ + public var hitPointsMode: kotlin.Int + @JvmName("getHitPointsMode") + get() = _builder.getHitPointsMode() + @JvmName("setHitPointsMode") + set(value) { + _builder.setHitPointsMode(value) + } + /** + * `int32 hitPointsMode = 10;` + */ + public fun clearHitPointsMode() { + _builder.clearHitPointsMode() + } + + /** + * `int32 targetPosition = 11;` + */ + public var targetPosition: kotlin.Int + @JvmName("getTargetPosition") + get() = _builder.getTargetPosition() + @JvmName("setTargetPosition") + set(value) { + _builder.setTargetPosition(value) + } + /** + * `int32 targetPosition = 11;` + */ + public fun clearTargetPosition() { + _builder.clearTargetPosition() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class DrawingsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .Event.NetDrawing drawings = 12;` + */ + public val drawings: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getDrawingsList() + ) + /** + * `repeated .Event.NetDrawing drawings = 12;` + * @param value The drawings to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addDrawings") + public fun com.google.protobuf.kotlin.DslList.add(value: net.taehui.EventClass.Event.NetDrawing) { + _builder.addDrawings(value) + } + /** + * `repeated .Event.NetDrawing drawings = 12;` + * @param value The drawings to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignDrawings") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.taehui.EventClass.Event.NetDrawing) { + add(value) + } + /** + * `repeated .Event.NetDrawing drawings = 12;` + * @param values The drawings to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllDrawings") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllDrawings(values) + } + /** + * `repeated .Event.NetDrawing drawings = 12;` + * @param values The drawings to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllDrawings") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .Event.NetDrawing drawings = 12;` + * @param index The index to set the value at. + * @param value The drawings to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setDrawings") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.taehui.EventClass.Event.NetDrawing) { + _builder.setDrawings(index, value) + } + /** + * `repeated .Event.NetDrawing drawings = 12;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearDrawings") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearDrawings() + } + + + /** + * `.Event.DrawingComponent drawingComponent = 13;` + */ + public var drawingComponent: net.taehui.EventClass.Event.DrawingComponent + @JvmName("getDrawingComponent") + get() = _builder.getDrawingComponent() + @JvmName("setDrawingComponent") + set(value) { + _builder.setDrawingComponent(value) + } + /** + * `.Event.DrawingComponent drawingComponent = 13;` + */ + public fun clearDrawingComponent() { + _builder.clearDrawingComponent() + } + /** + * `.Event.DrawingComponent drawingComponent = 13;` + * @return Whether the drawingComponent field is set. + */ + public fun hasDrawingComponent(): kotlin.Boolean { + return _builder.hasDrawingComponent() + } + } + } + } + @kotlin.jvm.JvmName("-initializeqwilightCallNet") + public inline fun qwilightCallNet(block: net.taehui.EventKt.QwilightCallNetKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightCallNet = + net.taehui.EventKt.QwilightCallNetKt.Dsl._create(net.taehui.EventClass.Event.QwilightCallNet.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.QwilightCallNet` + */ + public object QwilightCallNetKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.QwilightCallNet.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.QwilightCallNet.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.QwilightCallNet = _builder.build() + + /** + * `string siteID = 1;` + */ + public var siteID: kotlin.String + @JvmName("getSiteID") + get() = _builder.getSiteID() + @JvmName("setSiteID") + set(value) { + _builder.setSiteID(value) + } + /** + * `string siteID = 1;` + */ + public fun clearSiteID() { + _builder.clearSiteID() + } + + /** + * `string handlerID = 2;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 2;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `.Event.AvatarNetStatus avatarNetStatus = 3;` + */ + public var avatarNetStatus: net.taehui.EventClass.Event.AvatarNetStatus + @JvmName("getAvatarNetStatus") + get() = _builder.getAvatarNetStatus() + @JvmName("setAvatarNetStatus") + set(value) { + _builder.setAvatarNetStatus(value) + } + public var avatarNetStatusValue: kotlin.Int + @JvmName("getAvatarNetStatusValue") + get() = _builder.getAvatarNetStatusValue() + @JvmName("setAvatarNetStatusValue") + set(value) { + _builder.setAvatarNetStatusValue(value) + } + /** + * `.Event.AvatarNetStatus avatarNetStatus = 3;` + */ + public fun clearAvatarNetStatus() { + _builder.clearAvatarNetStatus() + } + + /** + * `int32 stand = 4;` + */ + public var stand: kotlin.Int + @JvmName("getStand") + get() = _builder.getStand() + @JvmName("setStand") + set(value) { + _builder.setStand(value) + } + /** + * `int32 stand = 4;` + */ + public fun clearStand() { + _builder.clearStand() + } + + /** + * `int32 highestBand = 5;` + */ + public var highestBand: kotlin.Int + @JvmName("getHighestBand") + get() = _builder.getHighestBand() + @JvmName("setHighestBand") + set(value) { + _builder.setHighestBand(value) + } + /** + * `int32 highestBand = 5;` + */ + public fun clearHighestBand() { + _builder.clearHighestBand() + } + + /** + * `double point = 6;` + */ + public var point: kotlin.Double + @JvmName("getPoint") + get() = _builder.getPoint() + @JvmName("setPoint") + set(value) { + _builder.setPoint(value) + } + /** + * `double point = 6;` + */ + public fun clearPoint() { + _builder.clearPoint() + } + + /** + * `double hitPoints = 7;` + */ + public var hitPoints: kotlin.Double + @JvmName("getHitPoints") + get() = _builder.getHitPoints() + @JvmName("setHitPoints") + set(value) { + _builder.setHitPoints(value) + } + /** + * `double hitPoints = 7;` + */ + public fun clearHitPoints() { + _builder.clearHitPoints() + } + + /** + * `bool isFailed = 8;` + */ + public var isFailed: kotlin.Boolean + @JvmName("getIsFailed") + get() = _builder.getIsFailed() + @JvmName("setIsFailed") + set(value) { + _builder.setIsFailed(value) + } + /** + * `bool isFailed = 8;` + */ + public fun clearIsFailed() { + _builder.clearIsFailed() + } + + /** + * `int32 lastJudged = 9;` + */ + public var lastJudged: kotlin.Int + @JvmName("getLastJudged") + get() = _builder.getLastJudged() + @JvmName("setLastJudged") + set(value) { + _builder.setLastJudged(value) + } + /** + * `int32 lastJudged = 9;` + */ + public fun clearLastJudged() { + _builder.clearLastJudged() + } + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class DrawingsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated .Event.NetDrawing drawings = 10;` + */ + public val drawings: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getDrawingsList() + ) + /** + * `repeated .Event.NetDrawing drawings = 10;` + * @param value The drawings to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addDrawings") + public fun com.google.protobuf.kotlin.DslList.add(value: net.taehui.EventClass.Event.NetDrawing) { + _builder.addDrawings(value) + } + /** + * `repeated .Event.NetDrawing drawings = 10;` + * @param value The drawings to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignDrawings") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: net.taehui.EventClass.Event.NetDrawing) { + add(value) + } + /** + * `repeated .Event.NetDrawing drawings = 10;` + * @param values The drawings to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllDrawings") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllDrawings(values) + } + /** + * `repeated .Event.NetDrawing drawings = 10;` + * @param values The drawings to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllDrawings") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated .Event.NetDrawing drawings = 10;` + * @param index The index to set the value at. + * @param value The drawings to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setDrawings") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: net.taehui.EventClass.Event.NetDrawing) { + _builder.setDrawings(index, value) + } + /** + * `repeated .Event.NetDrawing drawings = 10;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearDrawings") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearDrawings() + } + + + /** + * `.Event.DrawingComponent drawingComponent = 11;` + */ + public var drawingComponent: net.taehui.EventClass.Event.DrawingComponent + @JvmName("getDrawingComponent") + get() = _builder.getDrawingComponent() + @JvmName("setDrawingComponent") + set(value) { + _builder.setDrawingComponent(value) + } + /** + * `.Event.DrawingComponent drawingComponent = 11;` + */ + public fun clearDrawingComponent() { + _builder.clearDrawingComponent() + } + /** + * `.Event.DrawingComponent drawingComponent = 11;` + * @return Whether the drawingComponent field is set. + */ + public fun hasDrawingComponent(): kotlin.Boolean { + return _builder.hasDrawingComponent() + } + + /** + * `string title = 12;` + */ + public var title: kotlin.String + @JvmName("getTitle") + get() = _builder.getTitle() + @JvmName("setTitle") + set(value) { + _builder.setTitle(value) + } + /** + * `string title = 12;` + */ + public fun clearTitle() { + _builder.clearTitle() + } + + /** + * `string artist = 13;` + */ + public var artist: kotlin.String + @JvmName("getArtist") + get() = _builder.getArtist() + @JvmName("setArtist") + set(value) { + _builder.setArtist(value) + } + /** + * `string artist = 13;` + */ + public fun clearArtist() { + _builder.clearArtist() + } + + /** + * `string genre = 14;` + */ + public var genre: kotlin.String + @JvmName("getGenre") + get() = _builder.getGenre() + @JvmName("setGenre") + set(value) { + _builder.setGenre(value) + } + /** + * `string genre = 14;` + */ + public fun clearGenre() { + _builder.clearGenre() + } + + /** + * `int32 level = 15;` + */ + public var level: kotlin.Int + @JvmName("getLevel") + get() = _builder.getLevel() + @JvmName("setLevel") + set(value) { + _builder.setLevel(value) + } + /** + * `int32 level = 15;` + */ + public fun clearLevel() { + _builder.clearLevel() + } + + /** + * `string levelText = 16;` + */ + public var levelText: kotlin.String + @JvmName("getLevelText") + get() = _builder.getLevelText() + @JvmName("setLevelText") + set(value) { + _builder.setLevelText(value) + } + /** + * `string levelText = 16;` + */ + public fun clearLevelText() { + _builder.clearLevelText() + } + + /** + * `string wantLevelID = 17;` + */ + public var wantLevelID: kotlin.String + @JvmName("getWantLevelID") + get() = _builder.getWantLevelID() + @JvmName("setWantLevelID") + set(value) { + _builder.setWantLevelID(value) + } + /** + * `string wantLevelID = 17;` + */ + public fun clearWantLevelID() { + _builder.clearWantLevelID() + } + + /** + * `int32 autoMode = 18;` + */ + public var autoMode: kotlin.Int + @JvmName("getAutoMode") + get() = _builder.getAutoMode() + @JvmName("setAutoMode") + set(value) { + _builder.setAutoMode(value) + } + /** + * `int32 autoMode = 18;` + */ + public fun clearAutoMode() { + _builder.clearAutoMode() + } + + /** + * `int32 noteSaltMode = 19;` + */ + public var noteSaltMode: kotlin.Int + @JvmName("getNoteSaltMode") + get() = _builder.getNoteSaltMode() + @JvmName("setNoteSaltMode") + set(value) { + _builder.setNoteSaltMode(value) + } + /** + * `int32 noteSaltMode = 19;` + */ + public fun clearNoteSaltMode() { + _builder.clearNoteSaltMode() + } + + /** + * `double audioMultiplier = 20;` + */ + public var audioMultiplier: kotlin.Double + @JvmName("getAudioMultiplier") + get() = _builder.getAudioMultiplier() + @JvmName("setAudioMultiplier") + set(value) { + _builder.setAudioMultiplier(value) + } + /** + * `double audioMultiplier = 20;` + */ + public fun clearAudioMultiplier() { + _builder.clearAudioMultiplier() + } + + /** + * `int32 faintNoteMode = 21;` + */ + public var faintNoteMode: kotlin.Int + @JvmName("getFaintNoteMode") + get() = _builder.getFaintNoteMode() + @JvmName("setFaintNoteMode") + set(value) { + _builder.setFaintNoteMode(value) + } + /** + * `int32 faintNoteMode = 21;` + */ + public fun clearFaintNoteMode() { + _builder.clearFaintNoteMode() + } + + /** + * `int32 judgmentMode = 22;` + */ + public var judgmentMode: kotlin.Int + @JvmName("getJudgmentMode") + get() = _builder.getJudgmentMode() + @JvmName("setJudgmentMode") + set(value) { + _builder.setJudgmentMode(value) + } + /** + * `int32 judgmentMode = 22;` + */ + public fun clearJudgmentMode() { + _builder.clearJudgmentMode() + } + + /** + * `int32 hitPointsMode = 23;` + */ + public var hitPointsMode: kotlin.Int + @JvmName("getHitPointsMode") + get() = _builder.getHitPointsMode() + @JvmName("setHitPointsMode") + set(value) { + _builder.setHitPointsMode(value) + } + /** + * `int32 hitPointsMode = 23;` + */ + public fun clearHitPointsMode() { + _builder.clearHitPointsMode() + } + + /** + * `int32 noteMobilityMode = 24;` + */ + public var noteMobilityMode: kotlin.Int + @JvmName("getNoteMobilityMode") + get() = _builder.getNoteMobilityMode() + @JvmName("setNoteMobilityMode") + set(value) { + _builder.setNoteMobilityMode(value) + } + /** + * `int32 noteMobilityMode = 24;` + */ + public fun clearNoteMobilityMode() { + _builder.clearNoteMobilityMode() + } + + /** + * `int32 longNoteMode = 25;` + */ + public var longNoteMode: kotlin.Int + @JvmName("getLongNoteMode") + get() = _builder.getLongNoteMode() + @JvmName("setLongNoteMode") + set(value) { + _builder.setLongNoteMode(value) + } + /** + * `int32 longNoteMode = 25;` + */ + public fun clearLongNoteMode() { + _builder.clearLongNoteMode() + } + + /** + * `int32 inputFavorMode = 26;` + */ + public var inputFavorMode: kotlin.Int + @JvmName("getInputFavorMode") + get() = _builder.getInputFavorMode() + @JvmName("setInputFavorMode") + set(value) { + _builder.setInputFavorMode(value) + } + /** + * `int32 inputFavorMode = 26;` + */ + public fun clearInputFavorMode() { + _builder.clearInputFavorMode() + } + + /** + * `int32 noteModifyMode = 27;` + */ + public var noteModifyMode: kotlin.Int + @JvmName("getNoteModifyMode") + get() = _builder.getNoteModifyMode() + @JvmName("setNoteModifyMode") + set(value) { + _builder.setNoteModifyMode(value) + } + /** + * `int32 noteModifyMode = 27;` + */ + public fun clearNoteModifyMode() { + _builder.clearNoteModifyMode() + } + + /** + * `int32 bpmMode = 28;` + */ + public var bpmMode: kotlin.Int + @JvmName("getBpmMode") + get() = _builder.getBpmMode() + @JvmName("setBpmMode") + set(value) { + _builder.setBpmMode(value) + } + /** + * `int32 bpmMode = 28;` + */ + public fun clearBpmMode() { + _builder.clearBpmMode() + } + + /** + * `int32 waveMode = 29;` + */ + public var waveMode: kotlin.Int + @JvmName("getWaveMode") + get() = _builder.getWaveMode() + @JvmName("setWaveMode") + set(value) { + _builder.setWaveMode(value) + } + /** + * `int32 waveMode = 29;` + */ + public fun clearWaveMode() { + _builder.clearWaveMode() + } + + /** + * `int32 setNoteMode = 30;` + */ + public var setNoteMode: kotlin.Int + @JvmName("getSetNoteMode") + get() = _builder.getSetNoteMode() + @JvmName("setSetNoteMode") + set(value) { + _builder.setSetNoteMode(value) + } + /** + * `int32 setNoteMode = 30;` + */ + public fun clearSetNoteMode() { + _builder.clearSetNoteMode() + } + + /** + * `int32 lowestJudgmentConditionMode = 31;` + */ + public var lowestJudgmentConditionMode: kotlin.Int + @JvmName("getLowestJudgmentConditionMode") + get() = _builder.getLowestJudgmentConditionMode() + @JvmName("setLowestJudgmentConditionMode") + set(value) { + _builder.setLowestJudgmentConditionMode(value) + } + /** + * `int32 lowestJudgmentConditionMode = 31;` + */ + public fun clearLowestJudgmentConditionMode() { + _builder.clearLowestJudgmentConditionMode() + } + + /** + * `int32 totalNotes = 32;` + */ + public var totalNotes: kotlin.Int + @JvmName("getTotalNotes") + get() = _builder.getTotalNotes() + @JvmName("setTotalNotes") + set(value) { + _builder.setTotalNotes(value) + } + /** + * `int32 totalNotes = 32;` + */ + public fun clearTotalNotes() { + _builder.clearTotalNotes() + } + + /** + * `double judgmentStage = 33;` + */ + public var judgmentStage: kotlin.Double + @JvmName("getJudgmentStage") + get() = _builder.getJudgmentStage() + @JvmName("setJudgmentStage") + set(value) { + _builder.setJudgmentStage(value) + } + /** + * `double judgmentStage = 33;` + */ + public fun clearJudgmentStage() { + _builder.clearJudgmentStage() + } + + /** + * `double hitPointsValue = 34;` + */ + public var hitPointsValue: kotlin.Double + @JvmName("getHitPointsValue") + get() = _builder.getHitPointsValue() + @JvmName("setHitPointsValue") + set(value) { + _builder.setHitPointsValue(value) + } + /** + * `double hitPointsValue = 34;` + */ + public fun clearHitPointsValue() { + _builder.clearHitPointsValue() + } + + /** + * `int32 highestInputCount = 35;` + */ + public var highestInputCount: kotlin.Int + @JvmName("getHighestInputCount") + get() = _builder.getHighestInputCount() + @JvmName("setHighestInputCount") + set(value) { + _builder.setHighestInputCount(value) + } + /** + * `int32 highestInputCount = 35;` + */ + public fun clearHighestInputCount() { + _builder.clearHighestInputCount() + } + + /** + * `double length = 36;` + */ + public var length: kotlin.Double + @JvmName("getLength") + get() = _builder.getLength() + @JvmName("setLength") + set(value) { + _builder.setLength(value) + } + /** + * `double length = 36;` + */ + public fun clearLength() { + _builder.clearLength() + } + + /** + * `double bpm = 37;` + */ + public var bpm: kotlin.Double + @JvmName("getBpm") + get() = _builder.getBpm() + @JvmName("setBpm") + set(value) { + _builder.setBpm(value) + } + /** + * `double bpm = 37;` + */ + public fun clearBpm() { + _builder.clearBpm() + } + + /** + * `double multiplier = 38;` + */ + public var multiplier: kotlin.Double + @JvmName("getMultiplier") + get() = _builder.getMultiplier() + @JvmName("setMultiplier") + set(value) { + _builder.setMultiplier(value) + } + /** + * `double multiplier = 38;` + */ + public fun clearMultiplier() { + _builder.clearMultiplier() + } + + /** + * `int32 inputMode = 39;` + */ + public var inputMode: kotlin.Int + @JvmName("getInputMode") + get() = _builder.getInputMode() + @JvmName("setInputMode") + set(value) { + _builder.setInputMode(value) + } + /** + * `int32 inputMode = 39;` + */ + public fun clearInputMode() { + _builder.clearInputMode() + } + + /** + * `double highestJudgment0 = 40;` + */ + public var highestJudgment0: kotlin.Double + @JvmName("getHighestJudgment0") + get() = _builder.getHighestJudgment0() + @JvmName("setHighestJudgment0") + set(value) { + _builder.setHighestJudgment0(value) + } + /** + * `double highestJudgment0 = 40;` + */ + public fun clearHighestJudgment0() { + _builder.clearHighestJudgment0() + } + + /** + * `double higherJudgment0 = 41;` + */ + public var higherJudgment0: kotlin.Double + @JvmName("getHigherJudgment0") + get() = _builder.getHigherJudgment0() + @JvmName("setHigherJudgment0") + set(value) { + _builder.setHigherJudgment0(value) + } + /** + * `double higherJudgment0 = 41;` + */ + public fun clearHigherJudgment0() { + _builder.clearHigherJudgment0() + } + + /** + * `double highJudgment0 = 42;` + */ + public var highJudgment0: kotlin.Double + @JvmName("getHighJudgment0") + get() = _builder.getHighJudgment0() + @JvmName("setHighJudgment0") + set(value) { + _builder.setHighJudgment0(value) + } + /** + * `double highJudgment0 = 42;` + */ + public fun clearHighJudgment0() { + _builder.clearHighJudgment0() + } + + /** + * `double lowJudgment0 = 43;` + */ + public var lowJudgment0: kotlin.Double + @JvmName("getLowJudgment0") + get() = _builder.getLowJudgment0() + @JvmName("setLowJudgment0") + set(value) { + _builder.setLowJudgment0(value) + } + /** + * `double lowJudgment0 = 43;` + */ + public fun clearLowJudgment0() { + _builder.clearLowJudgment0() + } + + /** + * `double lowerJudgment0 = 44;` + */ + public var lowerJudgment0: kotlin.Double + @JvmName("getLowerJudgment0") + get() = _builder.getLowerJudgment0() + @JvmName("setLowerJudgment0") + set(value) { + _builder.setLowerJudgment0(value) + } + /** + * `double lowerJudgment0 = 44;` + */ + public fun clearLowerJudgment0() { + _builder.clearLowerJudgment0() + } + + /** + * `double lowestJudgment0 = 45;` + */ + public var lowestJudgment0: kotlin.Double + @JvmName("getLowestJudgment0") + get() = _builder.getLowestJudgment0() + @JvmName("setLowestJudgment0") + set(value) { + _builder.setLowestJudgment0(value) + } + /** + * `double lowestJudgment0 = 45;` + */ + public fun clearLowestJudgment0() { + _builder.clearLowestJudgment0() + } + + /** + * `double highestJudgment1 = 46;` + */ + public var highestJudgment1: kotlin.Double + @JvmName("getHighestJudgment1") + get() = _builder.getHighestJudgment1() + @JvmName("setHighestJudgment1") + set(value) { + _builder.setHighestJudgment1(value) + } + /** + * `double highestJudgment1 = 46;` + */ + public fun clearHighestJudgment1() { + _builder.clearHighestJudgment1() + } + + /** + * `double higherJudgment1 = 47;` + */ + public var higherJudgment1: kotlin.Double + @JvmName("getHigherJudgment1") + get() = _builder.getHigherJudgment1() + @JvmName("setHigherJudgment1") + set(value) { + _builder.setHigherJudgment1(value) + } + /** + * `double higherJudgment1 = 47;` + */ + public fun clearHigherJudgment1() { + _builder.clearHigherJudgment1() + } + + /** + * `double highJudgment1 = 48;` + */ + public var highJudgment1: kotlin.Double + @JvmName("getHighJudgment1") + get() = _builder.getHighJudgment1() + @JvmName("setHighJudgment1") + set(value) { + _builder.setHighJudgment1(value) + } + /** + * `double highJudgment1 = 48;` + */ + public fun clearHighJudgment1() { + _builder.clearHighJudgment1() + } + + /** + * `double lowJudgment1 = 49;` + */ + public var lowJudgment1: kotlin.Double + @JvmName("getLowJudgment1") + get() = _builder.getLowJudgment1() + @JvmName("setLowJudgment1") + set(value) { + _builder.setLowJudgment1(value) + } + /** + * `double lowJudgment1 = 49;` + */ + public fun clearLowJudgment1() { + _builder.clearLowJudgment1() + } + + /** + * `double lowerJudgment1 = 50;` + */ + public var lowerJudgment1: kotlin.Double + @JvmName("getLowerJudgment1") + get() = _builder.getLowerJudgment1() + @JvmName("setLowerJudgment1") + set(value) { + _builder.setLowerJudgment1(value) + } + /** + * `double lowerJudgment1 = 50;` + */ + public fun clearLowerJudgment1() { + _builder.clearLowerJudgment1() + } + + /** + * `double lowestJudgment1 = 51;` + */ + public var lowestJudgment1: kotlin.Double + @JvmName("getLowestJudgment1") + get() = _builder.getLowestJudgment1() + @JvmName("setLowestJudgment1") + set(value) { + _builder.setLowestJudgment1(value) + } + /** + * `double lowestJudgment1 = 51;` + */ + public fun clearLowestJudgment1() { + _builder.clearLowestJudgment1() + } + + /** + * `int32 highestJudgment = 52;` + */ + public var highestJudgment: kotlin.Int + @JvmName("getHighestJudgment") + get() = _builder.getHighestJudgment() + @JvmName("setHighestJudgment") + set(value) { + _builder.setHighestJudgment(value) + } + /** + * `int32 highestJudgment = 52;` + */ + public fun clearHighestJudgment() { + _builder.clearHighestJudgment() + } + + /** + * `int32 higherJudgment = 53;` + */ + public var higherJudgment: kotlin.Int + @JvmName("getHigherJudgment") + get() = _builder.getHigherJudgment() + @JvmName("setHigherJudgment") + set(value) { + _builder.setHigherJudgment(value) + } + /** + * `int32 higherJudgment = 53;` + */ + public fun clearHigherJudgment() { + _builder.clearHigherJudgment() + } + + /** + * `int32 highJudgment = 54;` + */ + public var highJudgment: kotlin.Int + @JvmName("getHighJudgment") + get() = _builder.getHighJudgment() + @JvmName("setHighJudgment") + set(value) { + _builder.setHighJudgment(value) + } + /** + * `int32 highJudgment = 54;` + */ + public fun clearHighJudgment() { + _builder.clearHighJudgment() + } + + /** + * `int32 lowJudgment = 55;` + */ + public var lowJudgment: kotlin.Int + @JvmName("getLowJudgment") + get() = _builder.getLowJudgment() + @JvmName("setLowJudgment") + set(value) { + _builder.setLowJudgment(value) + } + /** + * `int32 lowJudgment = 55;` + */ + public fun clearLowJudgment() { + _builder.clearLowJudgment() + } + + /** + * `int32 lowerJudgment = 56;` + */ + public var lowerJudgment: kotlin.Int + @JvmName("getLowerJudgment") + get() = _builder.getLowerJudgment() + @JvmName("setLowerJudgment") + set(value) { + _builder.setLowerJudgment(value) + } + /** + * `int32 lowerJudgment = 56;` + */ + public fun clearLowerJudgment() { + _builder.clearLowerJudgment() + } + + /** + * `int32 lowestJudgment = 57;` + */ + public var lowestJudgment: kotlin.Int + @JvmName("getLowestJudgment") + get() = _builder.getLowestJudgment() + @JvmName("setLowestJudgment") + set(value) { + _builder.setLowestJudgment(value) + } + /** + * `int32 lowestJudgment = 57;` + */ + public fun clearLowestJudgment() { + _builder.clearLowestJudgment() + } + } + } + @kotlin.jvm.JvmName("-initializenetDrawing") + public inline fun netDrawing(block: net.taehui.EventKt.NetDrawingKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.NetDrawing = + net.taehui.EventKt.NetDrawingKt.Dsl._create(net.taehui.EventClass.Event.NetDrawing.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.NetDrawing` + */ + public object NetDrawingKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.NetDrawing.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.NetDrawing.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.NetDrawing = _builder.build() + + /** + * `.Event.NetDrawing.Variety drawingVariety = 1;` + */ + public var drawingVariety: net.taehui.EventClass.Event.NetDrawing.Variety + @JvmName("getDrawingVariety") + get() = _builder.getDrawingVariety() + @JvmName("setDrawingVariety") + set(value) { + _builder.setDrawingVariety(value) + } + public var drawingVarietyValue: kotlin.Int + @JvmName("getDrawingVarietyValue") + get() = _builder.getDrawingVarietyValue() + @JvmName("setDrawingVarietyValue") + set(value) { + _builder.setDrawingVarietyValue(value) + } + /** + * `.Event.NetDrawing.Variety drawingVariety = 1;` + */ + public fun clearDrawingVariety() { + _builder.clearDrawingVariety() + } + + /** + * `uint32 param = 2;` + */ + public var param: kotlin.Int + @JvmName("getParam") + get() = _builder.getParam() + @JvmName("setParam") + set(value) { + _builder.setParam(value) + } + /** + * `uint32 param = 2;` + */ + public fun clearParam() { + _builder.clearParam() + } + + /** + * `double position0 = 3;` + */ + public var position0: kotlin.Double + @JvmName("getPosition0") + get() = _builder.getPosition0() + @JvmName("setPosition0") + set(value) { + _builder.setPosition0(value) + } + /** + * `double position0 = 3;` + */ + public fun clearPosition0() { + _builder.clearPosition0() + } + + /** + * `double position1 = 4;` + */ + public var position1: kotlin.Double + @JvmName("getPosition1") + get() = _builder.getPosition1() + @JvmName("setPosition1") + set(value) { + _builder.setPosition1(value) + } + /** + * `double position1 = 4;` + */ + public fun clearPosition1() { + _builder.clearPosition1() + } + + /** + * `double length = 5;` + */ + public var length: kotlin.Double + @JvmName("getLength") + get() = _builder.getLength() + @JvmName("setLength") + set(value) { + _builder.setLength(value) + } + /** + * `double length = 5;` + */ + public fun clearLength() { + _builder.clearLength() + } + + /** + * `double height = 6;` + */ + public var height: kotlin.Double + @JvmName("getHeight") + get() = _builder.getHeight() + @JvmName("setHeight") + set(value) { + _builder.setHeight(value) + } + /** + * `double height = 6;` + */ + public fun clearHeight() { + _builder.clearHeight() + } + } + } + @kotlin.jvm.JvmName("-initializedrawingComponent") + public inline fun drawingComponent(block: net.taehui.EventKt.DrawingComponentKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.DrawingComponent = + net.taehui.EventKt.DrawingComponentKt.Dsl._create(net.taehui.EventClass.Event.DrawingComponent.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.DrawingComponent` + */ + public object DrawingComponentKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.DrawingComponent.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.DrawingComponent.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.DrawingComponent = _builder.build() + + /** + * `float p2BuiltLength = 1;` + */ + public var p2BuiltLength: kotlin.Float + @JvmName("getP2BuiltLength") + get() = _builder.getP2BuiltLength() + @JvmName("setP2BuiltLength") + set(value) { + _builder.setP2BuiltLength(value) + } + /** + * `float p2BuiltLength = 1;` + */ + public fun clearP2BuiltLength() { + _builder.clearP2BuiltLength() + } + + /** + * `float judgmentMainPosition = 2;` + */ + public var judgmentMainPosition: kotlin.Float + @JvmName("getJudgmentMainPosition") + get() = _builder.getJudgmentMainPosition() + @JvmName("setJudgmentMainPosition") + set(value) { + _builder.setJudgmentMainPosition(value) + } + /** + * `float judgmentMainPosition = 2;` + */ + public fun clearJudgmentMainPosition() { + _builder.clearJudgmentMainPosition() + } + } + } + @kotlin.jvm.JvmName("-initializeqwilightIOInput") + public inline fun qwilightIOInput(block: net.taehui.EventKt.QwilightIOInputKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOInput = + net.taehui.EventKt.QwilightIOInputKt.Dsl._create(net.taehui.EventClass.Event.QwilightIOInput.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.QwilightIOInput` + */ + public object QwilightIOInputKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.QwilightIOInput.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.QwilightIOInput.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.QwilightIOInput = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class AvatarIDsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated string avatarIDs = 1;` + * @return A list containing the avatarIDs. + */ + public val avatarIDs: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getAvatarIDsList() + ) + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) { + _builder.addAvatarIDs(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) { + add(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllAvatarIDs(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param index The index to set the value at. + * @param value The avatarIDs to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setAvatarIDs") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) { + _builder.setAvatarIDs(index, value) + }/** + * `repeated string avatarIDs = 1;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearAvatarIDs() + } + /** + * `string handlerID = 2;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 2;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 input = 3;` + */ + public var input: kotlin.Int + @JvmName("getInput") + get() = _builder.getInput() + @JvmName("setInput") + set(value) { + _builder.setInput(value) + } + /** + * `int32 input = 3;` + */ + public fun clearInput() { + _builder.clearInput() + } + + /** + * `int32 power = 4;` + */ + public var power: kotlin.Int + @JvmName("getPower") + get() = _builder.getPower() + @JvmName("setPower") + set(value) { + _builder.setPower(value) + } + /** + * `int32 power = 4;` + */ + public fun clearPower() { + _builder.clearPower() + } + } + } + @kotlin.jvm.JvmName("-initializetwilightIOInput") + public inline fun twilightIOInput(block: net.taehui.EventKt.TwilightIOInputKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOInput = + net.taehui.EventKt.TwilightIOInputKt.Dsl._create(net.taehui.EventClass.Event.TwilightIOInput.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightIOInput` + */ + public object TwilightIOInputKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightIOInput.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightIOInput.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightIOInput = _builder.build() + + /** + * `string handlerID = 1;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 1;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 input = 2;` + */ + public var input: kotlin.Int + @JvmName("getInput") + get() = _builder.getInput() + @JvmName("setInput") + set(value) { + _builder.setInput(value) + } + /** + * `int32 input = 2;` + */ + public fun clearInput() { + _builder.clearInput() + } + + /** + * `int32 power = 3;` + */ + public var power: kotlin.Int + @JvmName("getPower") + get() = _builder.getPower() + @JvmName("setPower") + set(value) { + _builder.setPower(value) + } + /** + * `int32 power = 3;` + */ + public fun clearPower() { + _builder.clearPower() + } + } + } + @kotlin.jvm.JvmName("-initializeqwilightIOJudge") + public inline fun qwilightIOJudge(block: net.taehui.EventKt.QwilightIOJudgeKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOJudge = + net.taehui.EventKt.QwilightIOJudgeKt.Dsl._create(net.taehui.EventClass.Event.QwilightIOJudge.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.QwilightIOJudge` + */ + public object QwilightIOJudgeKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.QwilightIOJudge.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.QwilightIOJudge.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.QwilightIOJudge = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class AvatarIDsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated string avatarIDs = 1;` + * @return A list containing the avatarIDs. + */ + public val avatarIDs: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getAvatarIDsList() + ) + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) { + _builder.addAvatarIDs(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) { + add(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllAvatarIDs(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param index The index to set the value at. + * @param value The avatarIDs to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setAvatarIDs") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) { + _builder.setAvatarIDs(index, value) + }/** + * `repeated string avatarIDs = 1;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearAvatarIDs() + } + /** + * `string handlerID = 2;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 2;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 noteID = 3;` + */ + public var noteID: kotlin.Int + @JvmName("getNoteID") + get() = _builder.getNoteID() + @JvmName("setNoteID") + set(value) { + _builder.setNoteID(value) + } + /** + * `int32 noteID = 3;` + */ + public fun clearNoteID() { + _builder.clearNoteID() + } + + /** + * `int32 judged = 4;` + */ + public var judged: kotlin.Int + @JvmName("getJudged") + get() = _builder.getJudged() + @JvmName("setJudged") + set(value) { + _builder.setJudged(value) + } + /** + * `int32 judged = 4;` + */ + public fun clearJudged() { + _builder.clearJudged() + } + } + } + @kotlin.jvm.JvmName("-initializetwilightIOJudge") + public inline fun twilightIOJudge(block: net.taehui.EventKt.TwilightIOJudgeKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOJudge = + net.taehui.EventKt.TwilightIOJudgeKt.Dsl._create(net.taehui.EventClass.Event.TwilightIOJudge.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightIOJudge` + */ + public object TwilightIOJudgeKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightIOJudge.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightIOJudge.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightIOJudge = _builder.build() + + /** + * `string handlerID = 1;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 1;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 noteID = 2;` + */ + public var noteID: kotlin.Int + @JvmName("getNoteID") + get() = _builder.getNoteID() + @JvmName("setNoteID") + set(value) { + _builder.setNoteID(value) + } + /** + * `int32 noteID = 2;` + */ + public fun clearNoteID() { + _builder.clearNoteID() + } + + /** + * `int32 judged = 3;` + */ + public var judged: kotlin.Int + @JvmName("getJudged") + get() = _builder.getJudged() + @JvmName("setJudged") + set(value) { + _builder.setJudged(value) + } + /** + * `int32 judged = 3;` + */ + public fun clearJudged() { + _builder.clearJudged() + } + } + } + @kotlin.jvm.JvmName("-initializeqwilightIOJudgmentMeter") + public inline fun qwilightIOJudgmentMeter(block: net.taehui.EventKt.QwilightIOJudgmentMeterKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOJudgmentMeter = + net.taehui.EventKt.QwilightIOJudgmentMeterKt.Dsl._create(net.taehui.EventClass.Event.QwilightIOJudgmentMeter.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.QwilightIOJudgmentMeter` + */ + public object QwilightIOJudgmentMeterKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.QwilightIOJudgmentMeter.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.QwilightIOJudgmentMeter = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class AvatarIDsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated string avatarIDs = 1;` + * @return A list containing the avatarIDs. + */ + public val avatarIDs: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getAvatarIDsList() + ) + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) { + _builder.addAvatarIDs(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) { + add(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllAvatarIDs(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param index The index to set the value at. + * @param value The avatarIDs to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setAvatarIDs") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) { + _builder.setAvatarIDs(index, value) + }/** + * `repeated string avatarIDs = 1;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearAvatarIDs() + } + /** + * `string handlerID = 2;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 2;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 input = 3;` + */ + public var input: kotlin.Int + @JvmName("getInput") + get() = _builder.getInput() + @JvmName("setInput") + set(value) { + _builder.setInput(value) + } + /** + * `int32 input = 3;` + */ + public fun clearInput() { + _builder.clearInput() + } + + /** + * `double judgmentMeter = 4;` + */ + public var judgmentMeter: kotlin.Double + @JvmName("getJudgmentMeter") + get() = _builder.getJudgmentMeter() + @JvmName("setJudgmentMeter") + set(value) { + _builder.setJudgmentMeter(value) + } + /** + * `double judgmentMeter = 4;` + */ + public fun clearJudgmentMeter() { + _builder.clearJudgmentMeter() + } + + /** + * `int32 assist = 5;` + */ + public var assist: kotlin.Int + @JvmName("getAssist") + get() = _builder.getAssist() + @JvmName("setAssist") + set(value) { + _builder.setAssist(value) + } + /** + * `int32 assist = 5;` + */ + public fun clearAssist() { + _builder.clearAssist() + } + } + } + @kotlin.jvm.JvmName("-initializetwilightIOJudgmentMeter") + public inline fun twilightIOJudgmentMeter(block: net.taehui.EventKt.TwilightIOJudgmentMeterKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOJudgmentMeter = + net.taehui.EventKt.TwilightIOJudgmentMeterKt.Dsl._create(net.taehui.EventClass.Event.TwilightIOJudgmentMeter.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightIOJudgmentMeter` + */ + public object TwilightIOJudgmentMeterKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightIOJudgmentMeter.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightIOJudgmentMeter = _builder.build() + + /** + * `string handlerID = 1;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 1;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 input = 2;` + */ + public var input: kotlin.Int + @JvmName("getInput") + get() = _builder.getInput() + @JvmName("setInput") + set(value) { + _builder.setInput(value) + } + /** + * `int32 input = 2;` + */ + public fun clearInput() { + _builder.clearInput() + } + + /** + * `double judgmentMeter = 3;` + */ + public var judgmentMeter: kotlin.Double + @JvmName("getJudgmentMeter") + get() = _builder.getJudgmentMeter() + @JvmName("setJudgmentMeter") + set(value) { + _builder.setJudgmentMeter(value) + } + /** + * `double judgmentMeter = 3;` + */ + public fun clearJudgmentMeter() { + _builder.clearJudgmentMeter() + } + + /** + * `int32 assist = 4;` + */ + public var assist: kotlin.Int + @JvmName("getAssist") + get() = _builder.getAssist() + @JvmName("setAssist") + set(value) { + _builder.setAssist(value) + } + /** + * `int32 assist = 4;` + */ + public fun clearAssist() { + _builder.clearAssist() + } + } + } + @kotlin.jvm.JvmName("-initializeqwilightIONoteVisibility") + public inline fun qwilightIONoteVisibility(block: net.taehui.EventKt.QwilightIONoteVisibilityKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIONoteVisibility = + net.taehui.EventKt.QwilightIONoteVisibilityKt.Dsl._create(net.taehui.EventClass.Event.QwilightIONoteVisibility.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.QwilightIONoteVisibility` + */ + public object QwilightIONoteVisibilityKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.QwilightIONoteVisibility.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.QwilightIONoteVisibility = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class AvatarIDsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated string avatarIDs = 1;` + * @return A list containing the avatarIDs. + */ + public val avatarIDs: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getAvatarIDsList() + ) + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) { + _builder.addAvatarIDs(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) { + add(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllAvatarIDs(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param index The index to set the value at. + * @param value The avatarIDs to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setAvatarIDs") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) { + _builder.setAvatarIDs(index, value) + }/** + * `repeated string avatarIDs = 1;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearAvatarIDs() + } + /** + * `string handlerID = 2;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 2;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 noteID = 3;` + */ + public var noteID: kotlin.Int + @JvmName("getNoteID") + get() = _builder.getNoteID() + @JvmName("setNoteID") + set(value) { + _builder.setNoteID(value) + } + /** + * `int32 noteID = 3;` + */ + public fun clearNoteID() { + _builder.clearNoteID() + } + + /** + * `bool setValidJudgedNotes = 4;` + */ + public var setValidJudgedNotes: kotlin.Boolean + @JvmName("getSetValidJudgedNotes") + get() = _builder.getSetValidJudgedNotes() + @JvmName("setSetValidJudgedNotes") + set(value) { + _builder.setSetValidJudgedNotes(value) + } + /** + * `bool setValidJudgedNotes = 4;` + */ + public fun clearSetValidJudgedNotes() { + _builder.clearSetValidJudgedNotes() + } + + /** + * `bool setNoteFailed = 5;` + */ + public var setNoteFailed: kotlin.Boolean + @JvmName("getSetNoteFailed") + get() = _builder.getSetNoteFailed() + @JvmName("setSetNoteFailed") + set(value) { + _builder.setSetNoteFailed(value) + } + /** + * `bool setNoteFailed = 5;` + */ + public fun clearSetNoteFailed() { + _builder.clearSetNoteFailed() + } + } + } + @kotlin.jvm.JvmName("-initializetwilightIONoteVisibility") + public inline fun twilightIONoteVisibility(block: net.taehui.EventKt.TwilightIONoteVisibilityKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIONoteVisibility = + net.taehui.EventKt.TwilightIONoteVisibilityKt.Dsl._create(net.taehui.EventClass.Event.TwilightIONoteVisibility.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightIONoteVisibility` + */ + public object TwilightIONoteVisibilityKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightIONoteVisibility.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightIONoteVisibility = _builder.build() + + /** + * `string handlerID = 1;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 1;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 noteID = 2;` + */ + public var noteID: kotlin.Int + @JvmName("getNoteID") + get() = _builder.getNoteID() + @JvmName("setNoteID") + set(value) { + _builder.setNoteID(value) + } + /** + * `int32 noteID = 2;` + */ + public fun clearNoteID() { + _builder.clearNoteID() + } + + /** + * `bool setValidJudgedNotes = 3;` + */ + public var setValidJudgedNotes: kotlin.Boolean + @JvmName("getSetValidJudgedNotes") + get() = _builder.getSetValidJudgedNotes() + @JvmName("setSetValidJudgedNotes") + set(value) { + _builder.setSetValidJudgedNotes(value) + } + /** + * `bool setValidJudgedNotes = 3;` + */ + public fun clearSetValidJudgedNotes() { + _builder.clearSetValidJudgedNotes() + } + + /** + * `bool setNoteFailed = 4;` + */ + public var setNoteFailed: kotlin.Boolean + @JvmName("getSetNoteFailed") + get() = _builder.getSetNoteFailed() + @JvmName("setSetNoteFailed") + set(value) { + _builder.setSetNoteFailed(value) + } + /** + * `bool setNoteFailed = 4;` + */ + public fun clearSetNoteFailed() { + _builder.clearSetNoteFailed() + } + } + } + @kotlin.jvm.JvmName("-initializeqwilightIOMultiplier") + public inline fun qwilightIOMultiplier(block: net.taehui.EventKt.QwilightIOMultiplierKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOMultiplier = + net.taehui.EventKt.QwilightIOMultiplierKt.Dsl._create(net.taehui.EventClass.Event.QwilightIOMultiplier.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.QwilightIOMultiplier` + */ + public object QwilightIOMultiplierKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.QwilightIOMultiplier.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.QwilightIOMultiplier.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.QwilightIOMultiplier = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class AvatarIDsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated string avatarIDs = 1;` + * @return A list containing the avatarIDs. + */ + public val avatarIDs: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getAvatarIDsList() + ) + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) { + _builder.addAvatarIDs(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) { + add(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllAvatarIDs(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param index The index to set the value at. + * @param value The avatarIDs to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setAvatarIDs") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) { + _builder.setAvatarIDs(index, value) + }/** + * `repeated string avatarIDs = 1;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearAvatarIDs() + } + /** + * `string handlerID = 2;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 2;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `double multiplier = 3;` + */ + public var multiplier: kotlin.Double + @JvmName("getMultiplier") + get() = _builder.getMultiplier() + @JvmName("setMultiplier") + set(value) { + _builder.setMultiplier(value) + } + /** + * `double multiplier = 3;` + */ + public fun clearMultiplier() { + _builder.clearMultiplier() + } + } + } + @kotlin.jvm.JvmName("-initializetwilightIOMultiplier") + public inline fun twilightIOMultiplier(block: net.taehui.EventKt.TwilightIOMultiplierKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOMultiplier = + net.taehui.EventKt.TwilightIOMultiplierKt.Dsl._create(net.taehui.EventClass.Event.TwilightIOMultiplier.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightIOMultiplier` + */ + public object TwilightIOMultiplierKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightIOMultiplier.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightIOMultiplier.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightIOMultiplier = _builder.build() + + /** + * `string handlerID = 1;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 1;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `double multiplier = 2;` + */ + public var multiplier: kotlin.Double + @JvmName("getMultiplier") + get() = _builder.getMultiplier() + @JvmName("setMultiplier") + set(value) { + _builder.setMultiplier(value) + } + /** + * `double multiplier = 2;` + */ + public fun clearMultiplier() { + _builder.clearMultiplier() + } + } + } + @kotlin.jvm.JvmName("-initializeqwilightIOAudioMultiplier") + public inline fun qwilightIOAudioMultiplier(block: net.taehui.EventKt.QwilightIOAudioMultiplierKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOAudioMultiplier = + net.taehui.EventKt.QwilightIOAudioMultiplierKt.Dsl._create(net.taehui.EventClass.Event.QwilightIOAudioMultiplier.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.QwilightIOAudioMultiplier` + */ + public object QwilightIOAudioMultiplierKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.QwilightIOAudioMultiplier.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.QwilightIOAudioMultiplier = _builder.build() + + /** + * An uninstantiable, behaviorless type to represent the field in + * generics. + */ + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + public class AvatarIDsProxy private constructor() : com.google.protobuf.kotlin.DslProxy() + /** + * `repeated string avatarIDs = 1;` + * @return A list containing the avatarIDs. + */ + public val avatarIDs: com.google.protobuf.kotlin.DslList + @kotlin.jvm.JvmSynthetic + get() = com.google.protobuf.kotlin.DslList( + _builder.getAvatarIDsList() + ) + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.add(value: kotlin.String) { + _builder.addAvatarIDs(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param value The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(value: kotlin.String) { + add(value) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("addAllAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.addAll(values: kotlin.collections.Iterable) { + _builder.addAllAvatarIDs(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param values The avatarIDs to add. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("plusAssignAllAvatarIDs") + @Suppress("NOTHING_TO_INLINE") + public inline operator fun com.google.protobuf.kotlin.DslList.plusAssign(values: kotlin.collections.Iterable) { + addAll(values) + } + /** + * `repeated string avatarIDs = 1;` + * @param index The index to set the value at. + * @param value The avatarIDs to set. + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("setAvatarIDs") + public operator fun com.google.protobuf.kotlin.DslList.set(index: kotlin.Int, value: kotlin.String) { + _builder.setAvatarIDs(index, value) + }/** + * `repeated string avatarIDs = 1;` + */ + @kotlin.jvm.JvmSynthetic + @kotlin.jvm.JvmName("clearAvatarIDs") + public fun com.google.protobuf.kotlin.DslList.clear() { + _builder.clearAvatarIDs() + } + /** + * `string handlerID = 2;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 2;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `double audioMultiplier = 3;` + */ + public var audioMultiplier: kotlin.Double + @JvmName("getAudioMultiplier") + get() = _builder.getAudioMultiplier() + @JvmName("setAudioMultiplier") + set(value) { + _builder.setAudioMultiplier(value) + } + /** + * `double audioMultiplier = 3;` + */ + public fun clearAudioMultiplier() { + _builder.clearAudioMultiplier() + } + } + } + @kotlin.jvm.JvmName("-initializetwilightIOAudioMultiplier") + public inline fun twilightIOAudioMultiplier(block: net.taehui.EventKt.TwilightIOAudioMultiplierKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOAudioMultiplier = + net.taehui.EventKt.TwilightIOAudioMultiplierKt.Dsl._create(net.taehui.EventClass.Event.TwilightIOAudioMultiplier.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightIOAudioMultiplier` + */ + public object TwilightIOAudioMultiplierKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightIOAudioMultiplier.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightIOAudioMultiplier = _builder.build() + + /** + * `string handlerID = 1;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 1;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `double audioMultiplier = 2;` + */ + public var audioMultiplier: kotlin.Double + @JvmName("getAudioMultiplier") + get() = _builder.getAudioMultiplier() + @JvmName("setAudioMultiplier") + set(value) { + _builder.setAudioMultiplier(value) + } + /** + * `double audioMultiplier = 2;` + */ + public fun clearAudioMultiplier() { + _builder.clearAudioMultiplier() + } + } + } + @kotlin.jvm.JvmName("-initializetwilightAudioInput") + public inline fun twilightAudioInput(block: net.taehui.EventKt.TwilightAudioInputKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightAudioInput = + net.taehui.EventKt.TwilightAudioInputKt.Dsl._create(net.taehui.EventClass.Event.TwilightAudioInput.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightAudioInput` + */ + public object TwilightAudioInputKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightAudioInput.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightAudioInput.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightAudioInput = _builder.build() + + /** + * `string siteID = 1;` + */ + public var siteID: kotlin.String + @JvmName("getSiteID") + get() = _builder.getSiteID() + @JvmName("setSiteID") + set(value) { + _builder.setSiteID(value) + } + /** + * `string siteID = 1;` + */ + public fun clearSiteID() { + _builder.clearSiteID() + } + + /** + * `string avatarID = 2;` + */ + public var avatarID: kotlin.String + @JvmName("getAvatarID") + get() = _builder.getAvatarID() + @JvmName("setAvatarID") + set(value) { + _builder.setAvatarID(value) + } + /** + * `string avatarID = 2;` + */ + public fun clearAvatarID() { + _builder.clearAvatarID() + } + } + } + @kotlin.jvm.JvmName("-initializeqwilightPostItem") + public inline fun qwilightPostItem(block: net.taehui.EventKt.QwilightPostItemKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightPostItem = + net.taehui.EventKt.QwilightPostItemKt.Dsl._create(net.taehui.EventClass.Event.QwilightPostItem.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.QwilightPostItem` + */ + public object QwilightPostItemKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.QwilightPostItem.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.QwilightPostItem.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.QwilightPostItem = _builder.build() + + /** + * `string siteID = 1;` + */ + public var siteID: kotlin.String + @JvmName("getSiteID") + get() = _builder.getSiteID() + @JvmName("setSiteID") + set(value) { + _builder.setSiteID(value) + } + /** + * `string siteID = 1;` + */ + public fun clearSiteID() { + _builder.clearSiteID() + } + + /** + * `string handlerID = 2;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 2;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 postedItem = 3;` + */ + public var postedItem: kotlin.Int + @JvmName("getPostedItem") + get() = _builder.getPostedItem() + @JvmName("setPostedItem") + set(value) { + _builder.setPostedItem(value) + } + /** + * `int32 postedItem = 3;` + */ + public fun clearPostedItem() { + _builder.clearPostedItem() + } + + /** + * `int32 isPositive = 4;` + */ + public var isPositive: kotlin.Int + @JvmName("getIsPositive") + get() = _builder.getIsPositive() + @JvmName("setIsPositive") + set(value) { + _builder.setIsPositive(value) + } + /** + * `int32 isPositive = 4;` + */ + public fun clearIsPositive() { + _builder.clearIsPositive() + } + + /** + * `double lowestWait = 5;` + */ + public var lowestWait: kotlin.Double + @JvmName("getLowestWait") + get() = _builder.getLowestWait() + @JvmName("setLowestWait") + set(value) { + _builder.setLowestWait(value) + } + /** + * `double lowestWait = 5;` + */ + public fun clearLowestWait() { + _builder.clearLowestWait() + } + + /** + * `double highestWait = 6;` + */ + public var highestWait: kotlin.Double + @JvmName("getHighestWait") + get() = _builder.getHighestWait() + @JvmName("setHighestWait") + set(value) { + _builder.setHighestWait(value) + } + /** + * `double highestWait = 6;` + */ + public fun clearHighestWait() { + _builder.clearHighestWait() + } + } + } + @kotlin.jvm.JvmName("-initializetwilightPostItem") + public inline fun twilightPostItem(block: net.taehui.EventKt.TwilightPostItemKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightPostItem = + net.taehui.EventKt.TwilightPostItemKt.Dsl._create(net.taehui.EventClass.Event.TwilightPostItem.newBuilder()).apply { block() }._build() + /** + * Protobuf type `Event.TwilightPostItem` + */ + public object TwilightPostItemKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.EventClass.Event.TwilightPostItem.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.EventClass.Event.TwilightPostItem.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.EventClass.Event.TwilightPostItem = _builder.build() + + /** + * `string handlerID = 1;` + */ + public var handlerID: kotlin.String + @JvmName("getHandlerID") + get() = _builder.getHandlerID() + @JvmName("setHandlerID") + set(value) { + _builder.setHandlerID(value) + } + /** + * `string handlerID = 1;` + */ + public fun clearHandlerID() { + _builder.clearHandlerID() + } + + /** + * `int32 postedItem = 2;` + */ + public var postedItem: kotlin.Int + @JvmName("getPostedItem") + get() = _builder.getPostedItem() + @JvmName("setPostedItem") + set(value) { + _builder.setPostedItem(value) + } + /** + * `int32 postedItem = 2;` + */ + public fun clearPostedItem() { + _builder.clearPostedItem() + } + + /** + * `string avatarName = 3;` + */ + public var avatarName: kotlin.String + @JvmName("getAvatarName") + get() = _builder.getAvatarName() + @JvmName("setAvatarName") + set(value) { + _builder.setAvatarName(value) + } + /** + * `string avatarName = 3;` + */ + public fun clearAvatarName() { + _builder.clearAvatarName() + } + + /** + * `double wait = 4;` + */ + public var wait: kotlin.Double + @JvmName("getWait") + get() = _builder.getWait() + @JvmName("setWait") + set(value) { + _builder.setWait(value) + } + /** + * `double wait = 4;` + */ + public fun clearWait() { + _builder.clearWait() + } + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.copy(block: `net.taehui`.EventKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event = + `net.taehui`.EventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightCallNet.copy(block: `net.taehui`.EventKt.TwilightCallNetKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightCallNet = + `net.taehui`.EventKt.TwilightCallNetKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightCallNet.CallNetItem.copy(block: `net.taehui`.EventKt.TwilightCallNetKt.CallNetItemKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightCallNet.CallNetItem = + `net.taehui`.EventKt.TwilightCallNetKt.CallNetItemKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val net.taehui.EventClass.Event.TwilightCallNet.CallNetItemOrBuilder.drawingComponentOrNull: net.taehui.EventClass.Event.DrawingComponent? + get() = if (hasDrawingComponent()) getDrawingComponent() else null + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.QwilightCallNet.copy(block: `net.taehui`.EventKt.QwilightCallNetKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightCallNet = + `net.taehui`.EventKt.QwilightCallNetKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val net.taehui.EventClass.Event.QwilightCallNetOrBuilder.drawingComponentOrNull: net.taehui.EventClass.Event.DrawingComponent? + get() = if (hasDrawingComponent()) getDrawingComponent() else null + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.NetDrawing.copy(block: `net.taehui`.EventKt.NetDrawingKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.NetDrawing = + `net.taehui`.EventKt.NetDrawingKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.DrawingComponent.copy(block: `net.taehui`.EventKt.DrawingComponentKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.DrawingComponent = + `net.taehui`.EventKt.DrawingComponentKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.QwilightIOInput.copy(block: `net.taehui`.EventKt.QwilightIOInputKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOInput = + `net.taehui`.EventKt.QwilightIOInputKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightIOInput.copy(block: `net.taehui`.EventKt.TwilightIOInputKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOInput = + `net.taehui`.EventKt.TwilightIOInputKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.QwilightIOJudge.copy(block: `net.taehui`.EventKt.QwilightIOJudgeKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOJudge = + `net.taehui`.EventKt.QwilightIOJudgeKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightIOJudge.copy(block: `net.taehui`.EventKt.TwilightIOJudgeKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOJudge = + `net.taehui`.EventKt.TwilightIOJudgeKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.QwilightIOJudgmentMeter.copy(block: `net.taehui`.EventKt.QwilightIOJudgmentMeterKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOJudgmentMeter = + `net.taehui`.EventKt.QwilightIOJudgmentMeterKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightIOJudgmentMeter.copy(block: `net.taehui`.EventKt.TwilightIOJudgmentMeterKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOJudgmentMeter = + `net.taehui`.EventKt.TwilightIOJudgmentMeterKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.QwilightIONoteVisibility.copy(block: `net.taehui`.EventKt.QwilightIONoteVisibilityKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIONoteVisibility = + `net.taehui`.EventKt.QwilightIONoteVisibilityKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightIONoteVisibility.copy(block: `net.taehui`.EventKt.TwilightIONoteVisibilityKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIONoteVisibility = + `net.taehui`.EventKt.TwilightIONoteVisibilityKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.QwilightIOMultiplier.copy(block: `net.taehui`.EventKt.QwilightIOMultiplierKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOMultiplier = + `net.taehui`.EventKt.QwilightIOMultiplierKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightIOMultiplier.copy(block: `net.taehui`.EventKt.TwilightIOMultiplierKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOMultiplier = + `net.taehui`.EventKt.TwilightIOMultiplierKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.QwilightIOAudioMultiplier.copy(block: `net.taehui`.EventKt.QwilightIOAudioMultiplierKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightIOAudioMultiplier = + `net.taehui`.EventKt.QwilightIOAudioMultiplierKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightIOAudioMultiplier.copy(block: `net.taehui`.EventKt.TwilightIOAudioMultiplierKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightIOAudioMultiplier = + `net.taehui`.EventKt.TwilightIOAudioMultiplierKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightAudioInput.copy(block: `net.taehui`.EventKt.TwilightAudioInputKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightAudioInput = + `net.taehui`.EventKt.TwilightAudioInputKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.QwilightPostItem.copy(block: `net.taehui`.EventKt.QwilightPostItemKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.QwilightPostItem = + `net.taehui`.EventKt.QwilightPostItemKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.EventClass.Event.TwilightPostItem.copy(block: `net.taehui`.EventKt.TwilightPostItemKt.Dsl.() -> kotlin.Unit): net.taehui.EventClass.Event.TwilightPostItem = + `net.taehui`.EventKt.TwilightPostItemKt.Dsl._create(this.toBuilder()).apply { block() }._build() + +public val net.taehui.EventClass.EventOrBuilder.qwilightCallNetOrNull: net.taehui.EventClass.Event.QwilightCallNet? + get() = if (hasQwilightCallNet()) getQwilightCallNet() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightCallNetOrNull: net.taehui.EventClass.Event.TwilightCallNet? + get() = if (hasTwilightCallNet()) getTwilightCallNet() else null + +public val net.taehui.EventClass.EventOrBuilder.qwilightIOInputOrNull: net.taehui.EventClass.Event.QwilightIOInput? + get() = if (hasQwilightIOInput()) getQwilightIOInput() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightIOInputOrNull: net.taehui.EventClass.Event.TwilightIOInput? + get() = if (hasTwilightIOInput()) getTwilightIOInput() else null + +public val net.taehui.EventClass.EventOrBuilder.qwilightIOJudgeOrNull: net.taehui.EventClass.Event.QwilightIOJudge? + get() = if (hasQwilightIOJudge()) getQwilightIOJudge() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightIOJudgeOrNull: net.taehui.EventClass.Event.TwilightIOJudge? + get() = if (hasTwilightIOJudge()) getTwilightIOJudge() else null + +public val net.taehui.EventClass.EventOrBuilder.qwilightIOJudgmentMeterOrNull: net.taehui.EventClass.Event.QwilightIOJudgmentMeter? + get() = if (hasQwilightIOJudgmentMeter()) getQwilightIOJudgmentMeter() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightIOJudgmentMeterOrNull: net.taehui.EventClass.Event.TwilightIOJudgmentMeter? + get() = if (hasTwilightIOJudgmentMeter()) getTwilightIOJudgmentMeter() else null + +public val net.taehui.EventClass.EventOrBuilder.qwilightIONoteVisibilityOrNull: net.taehui.EventClass.Event.QwilightIONoteVisibility? + get() = if (hasQwilightIONoteVisibility()) getQwilightIONoteVisibility() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightIONoteVisibilityOrNull: net.taehui.EventClass.Event.TwilightIONoteVisibility? + get() = if (hasTwilightIONoteVisibility()) getTwilightIONoteVisibility() else null + +public val net.taehui.EventClass.EventOrBuilder.qwilightIOMultiplierOrNull: net.taehui.EventClass.Event.QwilightIOMultiplier? + get() = if (hasQwilightIOMultiplier()) getQwilightIOMultiplier() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightIOMultiplierOrNull: net.taehui.EventClass.Event.TwilightIOMultiplier? + get() = if (hasTwilightIOMultiplier()) getTwilightIOMultiplier() else null + +public val net.taehui.EventClass.EventOrBuilder.qwilightIOAudioMultiplierOrNull: net.taehui.EventClass.Event.QwilightIOAudioMultiplier? + get() = if (hasQwilightIOAudioMultiplier()) getQwilightIOAudioMultiplier() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightIOAudioMultiplierOrNull: net.taehui.EventClass.Event.TwilightIOAudioMultiplier? + get() = if (hasTwilightIOAudioMultiplier()) getTwilightIOAudioMultiplier() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightAudioInputOrNull: net.taehui.EventClass.Event.TwilightAudioInput? + get() = if (hasTwilightAudioInput()) getTwilightAudioInput() else null + +public val net.taehui.EventClass.EventOrBuilder.qwilightPostItemOrNull: net.taehui.EventClass.Event.QwilightPostItem? + get() = if (hasQwilightPostItem()) getQwilightPostItem() else null + +public val net.taehui.EventClass.EventOrBuilder.twilightPostItemOrNull: net.taehui.EventClass.Event.TwilightPostItem? + get() = if (hasTwilightPostItem()) getTwilightPostItem() else null + diff --git a/src/main/kotlin/net/taehui/InputEventKt.kt b/src/main/kotlin/net/taehui/InputEventKt.kt new file mode 100644 index 0000000..45bceaa --- /dev/null +++ b/src/main/kotlin/net/taehui/InputEventKt.kt @@ -0,0 +1,102 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Comment.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + +@kotlin.jvm.JvmName("-initializeinputEvent") +public inline fun inputEvent(block: net.taehui.InputEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.InputEvent = + net.taehui.InputEventKt.Dsl._create(net.taehui.CommentClass.InputEvent.newBuilder()).apply { block() }._build() +/** + * Protobuf type `InputEvent` + */ +public object InputEventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.CommentClass.InputEvent.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.CommentClass.InputEvent.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.CommentClass.InputEvent = _builder.build() + + /** + * `int32 input = 1;` + */ + public var input: kotlin.Int + @JvmName("getInput") + get() = _builder.getInput() + @JvmName("setInput") + set(value) { + _builder.setInput(value) + } + /** + * `int32 input = 1;` + */ + public fun clearInput() { + _builder.clearInput() + } + + /** + * `double wait = 2;` + */ + public var wait: kotlin.Double + @JvmName("getWait") + get() = _builder.getWait() + @JvmName("setWait") + set(value) { + _builder.setWait(value) + } + /** + * `double wait = 2;` + */ + public fun clearWait() { + _builder.clearWait() + } + + /** + * `int32 noteID = 3;` + */ + public var noteID: kotlin.Int + @JvmName("getNoteID") + get() = _builder.getNoteID() + @JvmName("setNoteID") + set(value) { + _builder.setNoteID(value) + } + /** + * `int32 noteID = 3;` + */ + public fun clearNoteID() { + _builder.clearNoteID() + } + + /** + * `int32 judged = 4;` + */ + public var judged: kotlin.Int + @JvmName("getJudged") + get() = _builder.getJudged() + @JvmName("setJudged") + set(value) { + _builder.setJudged(value) + } + /** + * `int32 judged = 4;` + */ + public fun clearJudged() { + _builder.clearJudged() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.CommentClass.InputEvent.copy(block: `net.taehui`.InputEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.InputEvent = + `net.taehui`.InputEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/src/main/kotlin/net/taehui/JudgmentMeterEventKt.kt b/src/main/kotlin/net/taehui/JudgmentMeterEventKt.kt new file mode 100644 index 0000000..8905859 --- /dev/null +++ b/src/main/kotlin/net/taehui/JudgmentMeterEventKt.kt @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Comment.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + +@kotlin.jvm.JvmName("-initializejudgmentMeterEvent") +public inline fun judgmentMeterEvent(block: net.taehui.JudgmentMeterEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.JudgmentMeterEvent = + net.taehui.JudgmentMeterEventKt.Dsl._create(net.taehui.CommentClass.JudgmentMeterEvent.newBuilder()).apply { block() }._build() +/** + * Protobuf type `JudgmentMeterEvent` + */ +public object JudgmentMeterEventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.CommentClass.JudgmentMeterEvent.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.CommentClass.JudgmentMeterEvent.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.CommentClass.JudgmentMeterEvent = _builder.build() + + /** + * `double judgmentMeter = 1;` + */ + public var judgmentMeter: kotlin.Double + @JvmName("getJudgmentMeter") + get() = _builder.getJudgmentMeter() + @JvmName("setJudgmentMeter") + set(value) { + _builder.setJudgmentMeter(value) + } + /** + * `double judgmentMeter = 1;` + */ + public fun clearJudgmentMeter() { + _builder.clearJudgmentMeter() + } + + /** + * `double wait = 2;` + */ + public var wait: kotlin.Double + @JvmName("getWait") + get() = _builder.getWait() + @JvmName("setWait") + set(value) { + _builder.setWait(value) + } + /** + * `double wait = 2;` + */ + public fun clearWait() { + _builder.clearWait() + } + + /** + * `int32 assist = 3;` + */ + public var assist: kotlin.Int + @JvmName("getAssist") + get() = _builder.getAssist() + @JvmName("setAssist") + set(value) { + _builder.setAssist(value) + } + /** + * `int32 assist = 3;` + */ + public fun clearAssist() { + _builder.clearAssist() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.CommentClass.JudgmentMeterEvent.copy(block: `net.taehui`.JudgmentMeterEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.JudgmentMeterEvent = + `net.taehui`.JudgmentMeterEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/src/main/kotlin/net/taehui/MultiplierEventKt.kt b/src/main/kotlin/net/taehui/MultiplierEventKt.kt new file mode 100644 index 0000000..f2cd79e --- /dev/null +++ b/src/main/kotlin/net/taehui/MultiplierEventKt.kt @@ -0,0 +1,85 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Comment.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + +@kotlin.jvm.JvmName("-initializemultiplierEvent") +public inline fun multiplierEvent(block: net.taehui.MultiplierEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.MultiplierEvent = + net.taehui.MultiplierEventKt.Dsl._create(net.taehui.CommentClass.MultiplierEvent.newBuilder()).apply { block() }._build() +/** + * Protobuf type `MultiplierEvent` + */ +public object MultiplierEventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.CommentClass.MultiplierEvent.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.CommentClass.MultiplierEvent.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.CommentClass.MultiplierEvent = _builder.build() + + /** + * `double multiplier = 1;` + */ + public var multiplier: kotlin.Double + @JvmName("getMultiplier") + get() = _builder.getMultiplier() + @JvmName("setMultiplier") + set(value) { + _builder.setMultiplier(value) + } + /** + * `double multiplier = 1;` + */ + public fun clearMultiplier() { + _builder.clearMultiplier() + } + + /** + * `double wait = 2;` + */ + public var wait: kotlin.Double + @JvmName("getWait") + get() = _builder.getWait() + @JvmName("setWait") + set(value) { + _builder.setWait(value) + } + /** + * `double wait = 2;` + */ + public fun clearWait() { + _builder.clearWait() + } + + /** + * `bool isAutoEvent = 3;` + */ + public var isAutoEvent: kotlin.Boolean + @JvmName("getIsAutoEvent") + get() = _builder.getIsAutoEvent() + @JvmName("setIsAutoEvent") + set(value) { + _builder.setIsAutoEvent(value) + } + /** + * `bool isAutoEvent = 3;` + */ + public fun clearIsAutoEvent() { + _builder.clearIsAutoEvent() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.CommentClass.MultiplierEvent.copy(block: `net.taehui`.MultiplierEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.MultiplierEvent = + `net.taehui`.MultiplierEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/src/main/kotlin/net/taehui/PaintEventKt.kt b/src/main/kotlin/net/taehui/PaintEventKt.kt new file mode 100644 index 0000000..59995f9 --- /dev/null +++ b/src/main/kotlin/net/taehui/PaintEventKt.kt @@ -0,0 +1,119 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: Comment.proto + +// Generated files should ignore deprecation warnings +@file:Suppress("DEPRECATION") +package net.taehui; + +@kotlin.jvm.JvmName("-initializepaintEvent") +public inline fun paintEvent(block: net.taehui.PaintEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.PaintEvent = + net.taehui.PaintEventKt.Dsl._create(net.taehui.CommentClass.PaintEvent.newBuilder()).apply { block() }._build() +/** + * Protobuf type `PaintEvent` + */ +public object PaintEventKt { + @kotlin.OptIn(com.google.protobuf.kotlin.OnlyForUseByGeneratedProtoCode::class) + @com.google.protobuf.kotlin.ProtoDslMarker + public class Dsl private constructor( + private val _builder: net.taehui.CommentClass.PaintEvent.Builder + ) { + public companion object { + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _create(builder: net.taehui.CommentClass.PaintEvent.Builder): Dsl = Dsl(builder) + } + + @kotlin.jvm.JvmSynthetic + @kotlin.PublishedApi + internal fun _build(): net.taehui.CommentClass.PaintEvent = _builder.build() + + /** + * `double hitPoints = 1;` + */ + public var hitPoints: kotlin.Double + @JvmName("getHitPoints") + get() = _builder.getHitPoints() + @JvmName("setHitPoints") + set(value) { + _builder.setHitPoints(value) + } + /** + * `double hitPoints = 1;` + */ + public fun clearHitPoints() { + _builder.clearHitPoints() + } + + /** + * `int32 stand = 2;` + */ + public var stand: kotlin.Int + @JvmName("getStand") + get() = _builder.getStand() + @JvmName("setStand") + set(value) { + _builder.setStand(value) + } + /** + * `int32 stand = 2;` + */ + public fun clearStand() { + _builder.clearStand() + } + + /** + * `int32 band = 3;` + */ + public var band: kotlin.Int + @JvmName("getBand") + get() = _builder.getBand() + @JvmName("setBand") + set(value) { + _builder.setBand(value) + } + /** + * `int32 band = 3;` + */ + public fun clearBand() { + _builder.clearBand() + } + + /** + * `double point = 4;` + */ + public var point: kotlin.Double + @JvmName("getPoint") + get() = _builder.getPoint() + @JvmName("setPoint") + set(value) { + _builder.setPoint(value) + } + /** + * `double point = 4;` + */ + public fun clearPoint() { + _builder.clearPoint() + } + + /** + * `double wait = 5;` + */ + public var wait: kotlin.Double + @JvmName("getWait") + get() = _builder.getWait() + @JvmName("setWait") + set(value) { + _builder.setWait(value) + } + /** + * `double wait = 5;` + */ + public fun clearWait() { + _builder.clearWait() + } + } +} +@kotlin.jvm.JvmSynthetic +public inline fun net.taehui.CommentClass.PaintEvent.copy(block: `net.taehui`.PaintEventKt.Dsl.() -> kotlin.Unit): net.taehui.CommentClass.PaintEvent = + `net.taehui`.PaintEventKt.Dsl._create(this.toBuilder()).apply { block() }._build() + diff --git a/src/main/kotlin/net/taehui/twilight/Avatar.kt b/src/main/kotlin/net/taehui/twilight/Avatar.kt new file mode 100644 index 0000000..63b4333 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/Avatar.kt @@ -0,0 +1,227 @@ +package net.taehui.twilight + +import com.google.protobuf.ByteString +import io.netty.channel.ChannelFuture +import io.netty.channel.ChannelHandlerContext +import net.taehui.EventClass +import net.taehui.twilight.qwilight.QwilightAvatar +import net.taehui.twilight.system.AvatarHandler +import net.taehui.twilight.system.DB +import net.taehui.twilight.system.LanguageSystem +import net.taehui.twilight.system.SiteHandler +import java.net.InetAddress +import java.time.LocalDateTime +import java.util.* + +interface Avatar : AutoCloseable, Logger { + val availableCSX: Any + val siteYellMillis: LinkedList + var lastSignInDate: LocalDateTime + var handler: ChannelHandlerContext + var isAwilight: Boolean + var isAvailable: Boolean + val isEnterQuitAware: Boolean + var isSignedIn: Boolean + var isEstablished: Boolean + var avatarID: String + var avatarName: String + var avatarEstimatedID: String + var avatarIP: InetAddress + var language: String + var situationValue: Int + var situationText: String + var isValve: Boolean + var avatarCompetence: Int + var qwilightHash: String + var qwilightDate: String + var qwilightID: String + var qwilightName: String + val avatarNameTitle: String + val loggerID: String + + fun doIfValid(event: EventClass.Event, onValid: () -> Unit) { + val millis = System.currentTimeMillis() + if (millis < 10 * 60 * 1000 + event.millis) { + if (event.eventID == EventClass.Event.EventID.ESTABLISH || avatarID == event.avatarID) { + onValid() + } else { + logInfo("$avatarID != ${event.avatarID}") + } + } else { + logInfo("$millis << ${event.millis}") + } + } + + fun doIfAvailable(onAvailable: () -> Unit) { + synchronized(availableCSX) { + if (isAvailable) { + onAvailable() + } + } + } + + fun wantSignedIn(toHandle: (String) -> Unit) { + wantEstablished { + if (isSignedIn) { + toHandle(it) + } + } + } + + fun wantNotSignedIn(toHandle: () -> Unit) { + wantEstablished { + if (!isSignedIn) { + toHandle() + } + } + } + + fun wantEstablished(toHandle: (String) -> Unit) { + if (isEstablished) { + toHandle(avatarID) + } + } + + fun wantNotEstablished(toHandle: () -> Unit) { + if (!isEstablished) { + toHandle() + } + } + + val remote: String + get() = avatarIP.hostAddress + + fun translateLanguage(target: String): String { + return LanguageSystem.getLanguage(language, target) + } + + val isSU: Boolean + get() = avatarCompetence == 2 + + fun isMillisSuitable(targetMillis: Long): Boolean { + if (siteYellMillis.size >= 5) { + val millis = siteYellMillis.poll() + siteYellMillis.offer(targetMillis) + return targetMillis - millis >= 5000 + } + siteYellMillis.offer(targetMillis) + return true + } + + fun allowSignIn(): Boolean { + return LocalDateTime.now().minusSeconds(1).isAfter(lastSignInDate) + } + + fun trySignInDate() { + lastSignInDate = LocalDateTime.now() + } + + fun handleNotSignIn() { + if (isSignedIn) { + SiteHandler.quitAvatar(this) + isSignedIn = false + avatarID = qwilightID + avatarName = avatarNameTitle + qwilightName + avatarCompetence = 1 + setLastDate() + send(EventClass.Event.EventID.NOT_SIGN_IN, object { + val avatarID = this@Avatar.avatarID + val avatarName = this@Avatar.avatarName + }) + } + } + + fun setLastDate() { + if (isSignedIn && !isAwilight) { + DB.setLastDate(Utility.getDefaultAvatarID(avatarID)) + } + } + + fun doNewSite(siteData: JSON.QwilightNewSite) { + if (siteData.siteName.isNotEmpty() && !siteData.siteName.startsWith("@")) { + val siteID = UUID.randomUUID() + if (siteData.isNetSite) { + SiteHandler.putNetSite(this, siteID, siteData) + } else { + SiteHandler.putSite(this, siteID, siteData) + } + } else { + send(EventClass.Event.EventID.WARNING, translateLanguage("siteNameNotValid")) + } + } + + fun doNewSilentSite(targetAvatarID: String) { + if (Utility.getDefaultAvatarID(avatarID) == Utility.getDefaultAvatarID( + targetAvatarID + ) + ) { + send(EventClass.Event.EventID.WARNING, translateLanguage("silentSiteAvatarIsYou")) + } else { + AvatarHandler.getAvatar(targetAvatarID)?.let { avatar -> + DB.getSilentSiteCompetence( + Utility.getDefaultAvatarID( + targetAvatarID + ) + ).thenAccept { + if (isSignedIn) { + if (it == QwilightAvatar.SILENT_SITE_CALLABLE || it == QwilightAvatar.SILENT_SITE_AVATAR && isSignedIn || it == QwilightAvatar.SILENT_SITE_UBUNTU && DB.isCrossUbuntu( + avatarID, targetAvatarID + ) + ) { + SiteHandler.putSilentSite(this, avatar) + } else { + send(EventClass.Event.EventID.WARNING, translateLanguage("lowerCompetenceAsSilentSite")) + } + } else { + send(EventClass.Event.EventID.WARNING, translateLanguage("silentSiteAvatarIsNotSignedIn")) + } + } + } + } + } + + fun setSiteName(siteID: String, siteName: String) { + if (siteName.isNotEmpty() && !siteName.startsWith("@")) { + SiteHandler.setSiteName(this, UUID.fromString(siteID), siteName) + } else { + send(EventClass.Event.EventID.WARNING, translateLanguage("siteNameNotValid")) + } + } + + fun handleSignIn(totem: String, avatarID: String, avatarName: String, avatarCompetence: Int) { + if (!isSignedIn) { + SiteHandler.quitAvatar(this) + isSignedIn = true + this.avatarID = avatarID + this.avatarName = avatarNameTitle + avatarName + this.avatarCompetence = avatarCompetence + setLastDate() + send(EventClass.Event.EventID.SIGN_IN, object { + val totem = totem + val avatarID = avatarID + val avatarName = avatarName + }) + } + } + + fun setEstablished(avatarID: String, qwilightName: String, isValve: Boolean) { + isEstablished = true + qwilightID = avatarID + this.qwilightName = qwilightName + this.isValve = isValve + this.avatarID = qwilightID + avatarName = avatarNameTitle + this.qwilightName + send(EventClass.Event.EventID.ESTABLISH, object { + val avatarID = avatarID + val avatarName = this@Avatar.avatarName + }) + } + + fun send(eventID: EventClass.Event.EventID, text: Any?, vararg data: ByteString?): ChannelFuture + + fun send(event: EventClass.Event) + + override fun close() { + handler.close() + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/BMSCompiler.kt b/src/main/kotlin/net/taehui/twilight/BMSCompiler.kt new file mode 100644 index 0000000..95300af --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/BMSCompiler.kt @@ -0,0 +1,818 @@ +package net.taehui.twilight + +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute +import net.taehui.twilight.note.* +import java.io.BufferedReader +import java.io.ByteArrayInputStream +import java.io.InputStreamReader +import java.util.* +import kotlin.math.abs +import kotlin.math.floor + +class BMSCompiler(noteFileContents: ByteArray, format: String) : BaseCompiler(noteFileContents, format) { + private open class BMSInputItem(val inputNote: InputNote, val bmsPosition: Double) : Comparable { + override fun compareTo(other: BMSInputItem): Int { + return inputNote.compareTo(other.inputNote) + } + } + + private class BMSLongInputItem(inputNote: InputNote, bmsPosition: Double, val bmsID: String) : + BMSInputItem(inputNote, bmsPosition) + + private open class EarlyBMSInputItem(val bmsPosition: Double) : Comparable { + override fun compareTo(other: EarlyBMSInputItem): Int { + return bmsPosition.compareTo(other.bmsPosition) + } + } + + private class EarlyBMSLongInputItem(bmsPosition: Double, val bmsID: String) : EarlyBMSInputItem(bmsPosition) + + private val lines = mutableListOf() + private val bmsPositionLogicalYMap = TreeMap() + private val bmsPositionBPMMap = TreeMap() + private val bmsPositionMultiplierMap = TreeMap() + private val bmsIDStopMap = mutableMapOf() + private val bmsIDMultiplierMap = mutableMapOf() + private var longNoteBMSID = "" + private var highestMeter = 0 + private var is4K = false + private var is6K = false + + override fun handleCompile(targetComputing: Computing) { + val bmsPositionBPMMap = TreeMap() + val meterMeterMultiplierMap = LinkedHashMap() + meterMeterMultiplierMap[-1] = 1.0 + val bmsIDBPMMap = mutableMapOf() + BufferedReader(InputStreamReader(ByteArrayInputStream(noteFileContents), format)).use { + val saltComputer = Random() + var lastBin = 0 + var isValidStatement = true + for (line in it.lines()) { + if (line.startsWith("#")) { + val mainContents = line.substring(1) + val mainData = mainContents.split(":", " ", ".", ";", limit = 2).toTypedArray() + val property = mainData[0] + if (isValidStatement) { + if (mainData.size > 1) { + val data = mainData[1] + if (property.equals("RANDOM", true)) { + val rValue = mainData[1].toInt() + lastBin = 1 + saltComputer.nextInt(data.toInt()) + if (rValue > 1) { + targetComputing.isSalt = true + } + continue + } else if (property.equals("IF", true)) { + isValidStatement = lastBin == data.toInt() + continue + } + } + lines.add(line) + } else { + if (property.equals("ELSE", true) || property.equals("ENDIF", true) || property.equals( + "IFEND", + true + ) + ) { + isValidStatement = true + } + } + } + } + } + for (line in lines) { + val mainContents = line.substring(1) + val mainData = mainContents.split(":", " ", ".", ";", limit = 2).toTypedArray() + if (isMainBMSData(mainContents)) { + var property = if (mainData.size > 1) mainData[0] else mainData[0].substring(0, 5) + property = property.padStart(5, '0') + val data = if (mainData.size > 1) mainData[1] else mainData[0].substring(5) + val meter = property.substring(0, 3).toInt() + highestMeter = meter.coerceAtLeast(highestMeter) + if (property[3] == '0' && property[4] == '2') { + meterMeterMultiplierMap[meter] = data.toDouble() + } + } else { + val property = mainData[0] + if (mainData.size > 1) { + val data = mainData[1] + if (property.startsWith("BPM", true)) { + if (property.length > 3) { + bmsIDBPMMap[property.substring(3, 5)] = data.toDouble() + } else { + try { + targetComputing.levyingBPM = data.toDouble() + } catch (e: NumberFormatException) { + val delimitedData = data.split(" ") + if (delimitedData.size > 1) { + bmsIDBPMMap[delimitedData[0]] = delimitedData[1].toDouble() + } else { + targetComputing.levyingBPM = data.split("-").toTypedArray()[0].toDouble() + } + } + } + } else if (property.equals("LNOBJ", true)) { + longNoteBMSID = data.trim { it <= ' ' } + } else if (property.equals("LNMODE", true)) { + when (data.toInt()) { + 1 -> targetComputing.isAutoLongNote = true + 2, 3 -> targetComputing.isAutoLongNote = false + } + } + } else { + if (property.equals("4K", true)) { + is4K = true + } else if (property.equals("6K", true)) { + is6K = true + } + } + } + } + val earlyBMSInputItemSet = mutableMapOf>() + val earlyBMSLongInputItemSet = mutableMapOf>() + valueComponent = Component(targetComputing.levyingBPM) + val bmsPositionSet = TreeSet() + var title = "" + var titleAssister = "" + var artist = "" + var artistAssister = "" + val audioTargets = mutableListOf() + val audioValues = mutableSetOf() + for (line in lines) { + val mainContents = line.substring(1) + val mainData = mainContents.split(":", " ", ".", ";", limit = 2).toTypedArray() + if (isMainBMSData(mainContents)) { + var property = if (mainData.size > 1) mainData[0] else mainData[0].substring(0, 5) + property = property.padStart(5, '0') + val noteVariety0 = property[3] + val noteVariety1 = property[4] + val data = if (mainData.size > 1) mainData[1] else mainData[0].substring(5) + val dataCount = data.length - data.length % 2 + val meter = property.substring(0, 3).toInt() + var meterCount = 0 + while (meterCount < dataCount) { + val dataValue = data.substring(meterCount, meterCount + 2) + if (dataValue != "00") { + val bmsPosition = meterCount.toDouble() / dataCount + meter + val rawInput = property.substring(3, 5) + when (noteVariety0) { + '0' -> { + when (noteVariety1) { + '1', '4', '6', '7' -> { + bmsPositionSet.add(bmsPosition) + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + } + + '3', '8', '9' -> bmsPositionSet.add(bmsPosition) + } + } + + '1', '2' -> { + if (noteVariety1 != '7') { + if (longNoteBMSID.isNotEmpty()) { + targetComputing.totalNotes += 1 + if (rawInput[1] == '6') { + targetComputing.autoableNotes += 1 + } + positionStandNoteCountMap[bmsPosition] = positionStandNoteCountMap.getOrDefault(bmsPosition, 0) + 1 + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + } else { + earlyBMSLongInputItemSet.getOrPut(rawInput) { + TreeSet() + }.add(EarlyBMSLongInputItem(bmsPosition, dataValue)) + } + } + bmsPositionSet.add(bmsPosition) + } + + '3', '4', '7', '9' -> bmsPositionSet.add(bmsPosition) + '5', '6' -> { + if (noteVariety1 != '7') { + if (longNoteBMSID.equals( + dataValue, + ignoreCase = true + ) + ) { + earlyBMSLongInputItemSet.getOrPut(rawInput) { + TreeSet() + }.add(EarlyBMSLongInputItem(bmsPosition, dataValue)) + } else { + earlyBMSInputItemSet.getOrPut(rawInput) { + TreeSet() + }.add(EarlyBMSInputItem(bmsPosition)) + } + bmsPositionSet.add(bmsPosition) + } + } + + 'D', 'E' -> { + if (noteVariety1 != '7') { + targetComputing.trapNotes += 1 + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + bmsPositionSet.add(bmsPosition) + } + } + + 'S' -> { + if (noteVariety1 == 'C') { + bmsPositionSet.add(bmsPosition) + } + } + } + } + meterCount += 2 + } + } else { + val property = mainData[0] + if (mainData.size > 1) { + val data = mainData[1].trim { it <= ' ' } + if (property.startsWith("WAV", true)) { + if (data.isNotEmpty()) { + audioTargets.add(property.substring(3, 5)) + } + } else if (property.startsWith("STOP", true)) { + bmsIDStopMap[property.substring(4, 6)] = data.toDouble() + } else if (property.startsWith("SCROLL", true)) { + bmsIDMultiplierMap[property.substring(6, 8)] = data.toDouble() + } else if (property.equals("TITLE", true)) { + title = data + } else if (property.equals("SUBTITLE", true)) { + titleAssister = data + } else if (property.equals("ARTIST", true)) { + artist = data + } else if (property.equals("SUBARTIST", true)) { + artistAssister = data + } else if (property.equals("GENRE", true)) { + targetComputing.genre = data + } else if (property.equals("PLAYLEVEL", true)) { + var levelTextValue = data.toDoubleOrNull() + if (levelTextValue != null) { + levelTextValue = abs(floor(levelTextValue)) + if (levelTextValue < 100) { + targetComputing.levelText = "LV. $data" + } else { + val levelText = levelTextValue.toString() + targetComputing.levelText = "LV. ${ + levelText.substring( + 0.coerceAtLeast(levelText.indexOf('.') - 2), + levelText.indexOf('.') + ) + }" + } + } else { + targetComputing.levelText = data + } + } else if (property.equals("DIFFICULTY", true)) { + if (data.isNotEmpty()) { + targetComputing.level = 1.coerceAtLeast(data.toInt()).coerceAtMost(5) + } + } else if (property.equals("RANK", true)) { + try { + when (0.coerceAtLeast(data.toInt().coerceAtMost(4))) { + 0 -> targetComputing.judgmentStage = 10.0 + 1 -> targetComputing.judgmentStage = 7.0 + 2 -> targetComputing.judgmentStage = 5.0 + 3 -> targetComputing.judgmentStage = 3.0 + 4 -> targetComputing.judgmentStage = 0.0 + } + } catch (_: NumberFormatException) { + } + } + } + } + } + for ((rawInput, earlyBMSLongInputItems) in earlyBMSLongInputItemSet) { + var lastEarlyBMSLongInputItem: EarlyBMSLongInputItem? = null + for (earlyBMSLongInputItem in earlyBMSLongInputItems) { + if (earlyBMSLongInputItem.bmsID.equals(longNoteBMSID, ignoreCase = true)) { + if (lastEarlyBMSLongInputItem != null) { + targetComputing.longNotes += 1 + targetComputing.totalNotes += 2 + if (rawInput[1] == '6') { + targetComputing.autoableNotes += 2 + } + var bmsPosition = lastEarlyBMSLongInputItem.bmsPosition + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + positionStandNoteCountMap[bmsPosition] = positionStandNoteCountMap.getOrDefault(bmsPosition, 0) + 1 + bmsPosition = earlyBMSLongInputItem.bmsPosition + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + positionStandNoteCountMap[bmsPosition] = positionStandNoteCountMap.getOrDefault(bmsPosition, 0) + 1 + lastEarlyBMSLongInputItem = null + continue + } + } else { + if (lastEarlyBMSLongInputItem != null) { + targetComputing.totalNotes += 1 + if (rawInput[1] == '6') { + targetComputing.autoableNotes += 1 + } + val bmsPosition = lastEarlyBMSLongInputItem.bmsPosition + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + positionStandNoteCountMap[bmsPosition] = positionStandNoteCountMap.getOrDefault(bmsPosition, 0) + 1 + } + } + lastEarlyBMSLongInputItem = earlyBMSLongInputItem + } + if (lastEarlyBMSLongInputItem != null) { + targetComputing.totalNotes += 1 + if (rawInput[1] == '6') { + targetComputing.autoableNotes += 1 + } + val bmsPosition = lastEarlyBMSLongInputItem.bmsPosition + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + positionStandNoteCountMap[bmsPosition] = positionStandNoteCountMap.getOrDefault(bmsPosition, 0) + 1 + } + } + for ((rawInput, earlyBMSInputItems) in earlyBMSInputItemSet) { + var lastEarlyBMSInputItem: EarlyBMSInputItem? = null + for (earlyBMSInputItem in earlyBMSInputItems) { + if (lastEarlyBMSInputItem != null) { + targetComputing.longNotes += 1 + targetComputing.totalNotes += 2 + if (rawInput[1] == '6') { + targetComputing.autoableNotes += 2 + } + var bmsPosition = lastEarlyBMSInputItem.bmsPosition + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + positionStandNoteCountMap[bmsPosition] = positionStandNoteCountMap.getOrDefault(bmsPosition, 0) + 1 + bmsPosition = earlyBMSInputItem.bmsPosition + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + positionStandNoteCountMap[bmsPosition] = positionStandNoteCountMap.getOrDefault(bmsPosition, 0) + 1 + lastEarlyBMSInputItem = null + } else { + lastEarlyBMSInputItem = earlyBMSInputItem + } + } + if (lastEarlyBMSInputItem != null) { + targetComputing.totalNotes += 1 + if (rawInput[1] == '6') { + targetComputing.autoableNotes += 1 + } + val bmsPosition = lastEarlyBMSInputItem.bmsPosition + highestPosition = highestPosition.coerceAtLeast(bmsPosition) + positionStandNoteCountMap[bmsPosition] = positionStandNoteCountMap.getOrDefault(bmsPosition, 0) + 1 + } + } + targetComputing.title = + if (titleAssister.isEmpty() || title.endsWith(titleAssister)) title else "$title $titleAssister" + targetComputing.artist = if (artistAssister.isEmpty()) artist else "$artist / $artistAssister" + val inputSet = mutableSetOf() + for (line in lines) { + val mainContents = line.substring(1) + val mainData = mainContents.split(":", " ", ".", ";", limit = 2).toTypedArray() + if (isMainBMSData(mainContents)) { + var property = if (mainData.size > 1) mainData[0] else mainData[0].substring(0, 5) + property = property.padStart(5, '0') + val data = if (mainData.size > 1) mainData[1] else mainData[0].substring(5) + val dataCount = data.length - data.length % 2 + val meter = property.substring(0, 3).toInt() + var meterCount = 0 + while (meterCount < dataCount) { + val mData = data.substring(meterCount, meterCount + 2) + if (mData != "00") { + val bmsPosition = meterCount.toDouble() / dataCount + meter + val noteVariety0 = property[3] + val noteVariety1 = property[4] + when (noteVariety0) { + '0' -> { + when (noteVariety1) { + '3' -> bpmValues[bmsPosition] = mData.toInt(16).toDouble() + '8' -> { + bmsIDBPMMap[mData]?.let { + bpmValues[bmsPosition] = it + } + } + + '9' -> { + bmsIDStopMap[mData]?.let { + bmsPositionBPMMap[bmsPosition] = it + } + } + } + } + + '1', '2', '5', '6' -> { + if (audioTargets.contains(mData)) { + audioValues.add(mData) + } + } + + 'S' -> { + if (noteVariety1 == 'C') { + bmsIDMultiplierMap[mData]?.let { + this.bmsPositionMultiplierMap[bmsPosition] = it + } + } + } + } + inputSet.add(getBMSInput(noteVariety1, noteVariety0, Component.InputMode.INPUT_MODE_142)) + } + meterCount += 2 + } + } else { + if (mainData.size > 1) { + val data = mainData[1] + if (mainData[0].equals("TOTAL", ignoreCase = true)) { + try { + targetComputing.hitPointsValue = + 0.0.coerceAtLeast(data.toDouble()) / (100 * targetComputing.totalNotes) + } catch (_: NumberFormatException) { + } + } + } + } + } + targetComputing.inputMode = getInputMode(inputSet) + if (targetComputing.inputMode == Component.InputMode.INPUT_MODE_102 && (targetComputing.title.contains( + "9B", + true + ) || targetComputing.title.contains( + "9K", + true + ) || targetComputing.title.contains( + "PMS", + true + )) + ) { + targetComputing.inputMode = Component.InputMode.INPUT_MODE_9 + } + for (i in 0..highestMeter + 1) { + bmsPositionSet.add(i.toDouble()) + } + + var lastBMSPosition = 0.0 + var lastLogicalY = 0.0 + var lastWait = 0.0 + var lastMultiplierValue = 1.0 + var lastBPM = targetComputing.levyingBPM + for (bmsPosition in bmsPositionSet) { + val meterMultiplier = meterMeterMultiplierMap.getOrDefault(floor(lastBMSPosition).toInt(), 1.0) + lastLogicalY -= (bmsPosition - lastBMSPosition) * lastMultiplierValue * meterMultiplier * valueComponent.logicalYMeter + bmsPositionLogicalYMap[bmsPosition] = lastLogicalY + this.bmsPositionMultiplierMap[bmsPosition]?.let { + lastMultiplierValue = it + } + lastWait += valueComponent.millisMeter * meterMultiplier * (bmsPosition - lastBMSPosition) + bpmValues[bmsPosition]?.let { + lastBPM = it + valueComponent.setBPM(it) + } + waitValues[bmsPosition] = lastWait + lastBMSPosition = bmsPosition + bmsPositionBPMMap[bmsPosition]?.let { + lastWait += valueComponent.millisMeter * it / Component.STANDARD_METER + this.bmsPositionBPMMap[bmsPosition] = lastBPM + } + } + targetComputing.isBanned = audioValues.size < 2 || targetComputing.totalNotes == 0 + targetComputing.noteVariety = Component.NoteVariety.BMS + } + + override fun handleCompile(defaultComputer: DefaultCompute) { + handleCompile(defaultComputer as Computing) + for (i in highestMeter + 1 downTo 0) { + val logicalY = valueComponent.levyingHeight + bmsPositionLogicalYMap[i.toDouble()]!! + val wait = waitValues[i.toDouble()]!! + notes.add(MeterNote(logicalY, wait)) + } + val inputCount = Component.INPUT_COUNTS[defaultComputer.inputMode.ordinal] + val bmsInputItemSets = mutableListOf>() + for (i in inputCount downTo 0) { + bmsInputItemSets.add(TreeSet()) + } + val bmsLongInputItemSets = mutableListOf>() + for (i in inputCount downTo 0) { + bmsLongInputItemSets.add(TreeSet()) + } + for (line in lines) { + val mainContents = line.substring(1) + if (isMainBMSData(mainContents)) { + val mainData = mainContents.split(":", " ", ".", ";", limit = 2).toTypedArray() + var property = if (mainData.size > 1) mainData[0] else mainData[0].substring(0, 5) + property = property.padStart(5, '0') + val noteVariety0 = property[3] + val noteVariety1 = property[4] + if (noteVariety0 != '0' || noteVariety1 != '2') { + val data = if (mainData.size > 1) mainData[1] else mainData[0].substring(5) + val dataCount = data.length - data.length % 2 + val meter = property.substring(0, 3).toInt() + var meterCount = 0 + while (meterCount < dataCount) { + val dataValue = data.substring(meterCount, meterCount + 2) + if (dataValue != "00") { + val input = getBMSInput(noteVariety1, noteVariety0, defaultComputer.inputMode) + val bmsPosition = meterCount.toDouble() / dataCount + meter + val logicalY = valueComponent.levyingHeight + bmsPositionLogicalYMap[bmsPosition]!! + val wait = waitValues[bmsPosition]!! + when (noteVariety0) { + '0' -> { + when (noteVariety1) { + '1' -> defaultComputer.waitAudioNoteMap.add(wait) + '3', '8' -> { + bpmValues[bmsPosition]?.let { + waitBPMMap[wait] = it + } + } + + '4', '6', '7' -> defaultComputer.waitMediaNoteMap.add(wait) + '9' -> { + bmsPositionBPMMap[bmsPosition]?.let { + valueComponent.setBPM(it) + waitStopMap[wait] = 0.0 + waitStopMap[wait + valueComponent.millisMeter * bmsIDStopMap[dataValue]!! / Component.STANDARD_METER] = + it + } + } + } + } + + '1', '2' -> { + if (input != 0) { + val inputNote = InputNote(logicalY, wait, input) + if (longNoteBMSID.isEmpty()) { + notes.add(inputNote) + } else { + bmsLongInputItemSets[input].add( + BMSLongInputItem( + inputNote, + bmsPosition, + dataValue + ) + ) + } + } + } + + '3', '4' -> { + if (input != 0) { + notes.add(VoidNote(logicalY, wait, input)) + } + } + + '5', '6' -> { + if (input != 0) { + val inputNote = InputNote(logicalY, wait, input) + if (longNoteBMSID.equals( + dataValue, + ignoreCase = true + ) + ) { + bmsLongInputItemSets[input].add( + BMSLongInputItem( + inputNote, + bmsPosition, + dataValue + ) + ) + } else { + bmsInputItemSets[input].add(BMSInputItem(inputNote, bmsPosition)) + } + } + } + + 'D', 'E' -> { + if (input != 0) { + notes.add(TrapNote(logicalY, wait, input)) + } + } + + 'S' -> { + if (noteVariety1 == 'C') { + bmsPositionMultiplierMap[bmsPosition]?.let { + waitMultiplierMap[wait] = it + } + } + } + } + } + meterCount += 2 + } + } + } + } + for (i in inputCount downTo 1) { + var lastBMSLongInputItem: BMSLongInputItem? = null + for (bmsLongInputItem in bmsLongInputItemSets[i]) { + if (bmsLongInputItem.bmsID.equals(longNoteBMSID, ignoreCase = true)) { + if (lastBMSLongInputItem != null) { + val lastInputNote = lastBMSLongInputItem.inputNote + val lastWait = lastInputNote.wait + val targetWait = bmsLongInputItem.inputNote.wait + notes.removeAll(notes.filter { + it.wait in lastWait..targetWait && it.input == i + }.toSet()) + notes.add( + LongNote( + lastInputNote.logicalY, + lastWait, + lastInputNote.input, + targetWait - lastWait, + valueComponent.levyingHeight + bmsPositionLogicalYMap[lastBMSLongInputItem.bmsPosition]!! - bmsLongInputItem.inputNote.logicalY + ) + ) + lastBMSLongInputItem = null + continue + } + } else { + if (lastBMSLongInputItem != null) { + notes.add(lastBMSLongInputItem.inputNote) + } + } + lastBMSLongInputItem = bmsLongInputItem + } + if (lastBMSLongInputItem != null) { + notes.add(lastBMSLongInputItem.inputNote) + } + } + for (i in inputCount downTo 1) { + var lastBMSInputItem: BMSInputItem? = null + for (bmsInputItem in bmsInputItemSets[i]) { + lastBMSInputItem = if (lastBMSInputItem != null) { + val lastInputNote = lastBMSInputItem.inputNote + val lastWait = lastInputNote.wait + val targetWait = bmsInputItem.inputNote.wait + notes.removeAll(notes.filter { + it.wait in lastWait..targetWait && it.input == i + }.toSet()) + notes.add( + LongNote( + lastInputNote.logicalY, + lastWait, + lastInputNote.input, + targetWait - lastWait, + valueComponent.levyingHeight + bmsPositionLogicalYMap[lastBMSInputItem.bmsPosition]!! - bmsInputItem.inputNote.logicalY + ) + ) + null + } else { + bmsInputItem + } + } + if (lastBMSInputItem != null) { + notes.add(lastBMSInputItem.inputNote) + } + } + } + + private fun getInputMode(inputSet: Collection): Component.InputMode { + if (is4K) { + return Component.InputMode.INPUT_MODE_4 + } + if (is6K) { + return Component.InputMode.INPUT_MODE_6 + } + if (inputSet.all { it == 0 }) { + return Component.InputMode.INPUT_MODE_51 + } + val isMode71 = inputSet.contains(7) || inputSet.contains(8) + val isMode102 = + inputSet.contains(9) || inputSet.contains(10) || inputSet.contains(11) || inputSet.contains(12) || inputSet.contains( + 13 + ) + val isMode142 = isMode71 && isMode102 || inputSet.contains(14) || inputSet.contains(15) + if (isMode142) { + return Component.InputMode.INPUT_MODE_142 + } + if (isMode102) { + return Component.InputMode.INPUT_MODE_102 + } + if (isMode71) { + return Component.InputMode.INPUT_MODE_71 + } + return Component.InputMode.INPUT_MODE_51 + } + + private fun getBMSInput(noteVariety0: Char, noteVariety1: Char, inputMode: Component.InputMode): Int { + when (noteVariety1) { + '1', '3', '5', 'D' -> { + when (inputMode) { + Component.InputMode.INPUT_MODE_4 -> { + when (noteVariety0) { + '1', '2' -> { + return noteVariety0.code - '0'.code + } + + '4', '5' -> { + return noteVariety0.code - '1'.code + } + } + } + + Component.InputMode.INPUT_MODE_51, Component.InputMode.INPUT_MODE_102 -> { + when (noteVariety0) { + '1', '2', '3', '4', '5' -> { + return noteVariety0.code - '0'.code + 1 + } + + '6' -> { + return 1 + } + } + } + + Component.InputMode.INPUT_MODE_6 -> { + when (noteVariety0) { + '1', '2', '3' -> { + return noteVariety0.code - '0'.code + } + + '5' -> { + return noteVariety0.code - '1'.code + } + + '8', '9' -> { + return noteVariety0.code - '3'.code + } + } + } + + Component.InputMode.INPUT_MODE_71, Component.InputMode.INPUT_MODE_142 -> { + when (noteVariety0) { + '1', '2', '3', '4', '5' -> { + return noteVariety0.code - '0'.code + 1 + } + + '6' -> { + return 1 + } + + '8', '9' -> { + return noteVariety0.code - '1'.code + } + } + } + + Component.InputMode.INPUT_MODE_9 -> { + when (noteVariety0) { + '1', '2', '3', '4', '5' -> { + return noteVariety0.code - '0'.code + } + } + } + + else -> Unit + } + } + + '2', '4', '6', 'E' -> { + when (inputMode) { + Component.InputMode.INPUT_MODE_102 -> { + when (noteVariety0) { + '1', '2', '3', '4', '5' -> { + return noteVariety0.code - '0'.code + 6 + } + + '6' -> { + return 12 + } + } + } + + Component.InputMode.INPUT_MODE_142 -> { + when (noteVariety0) { + '1', '2', '3', '4', '5' -> { + return noteVariety0.code - '0'.code + 8 + } + + '6' -> { + return 16 + } + + '8', '9' -> { + return noteVariety0.code - '2'.code + 8 + } + } + } + + Component.InputMode.INPUT_MODE_9 -> { + when (noteVariety0) { + '2', '3', '4', '5' -> { + return noteVariety0.code - '0'.code + 4 + } + } + } + + else -> Unit + } + } + } + return 0 + } + + companion object { + fun isMainBMSData(mainContents: String): Boolean { + return if (mainContents.length >= 5) { + val mainContent3 = mainContents[3] + val mainContent4 = mainContents[4] + Character.isDigit(mainContents[0]) && Character.isDigit(mainContents[1]) && Character.isDigit( + mainContents[2] + ) && (Character.isDigit(mainContent3) || (mainContent3 == 'D' || mainContent3 == 'E') && Character.isDigit( + mainContent4 + ) || mainContent3 == 'S' && mainContent4 == 'C') + } else { + false + } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/BMSONCompiler.kt b/src/main/kotlin/net/taehui/twilight/BMSONCompiler.kt new file mode 100644 index 0000000..7e3d0e5 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/BMSONCompiler.kt @@ -0,0 +1,383 @@ +package net.taehui.twilight + +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute +import net.taehui.twilight.note.InputNote +import net.taehui.twilight.note.LongNote +import net.taehui.twilight.note.MeterNote +import net.taehui.twilight.note.TrapNote +import org.apache.commons.lang3.ArrayUtils +import java.nio.charset.Charset +import java.util.* +import kotlin.math.abs + +class BMSONCompiler(noteFileContents: ByteArray, format: String) : BaseCompiler(noteFileContents, format) { + private val bmsonPositionLogicalYMap = TreeMap() + private val bmsonPositionBPMMap = TreeMap() + private lateinit var text: JSON.Bmson + private var res = 0L + + override fun handleCompile(targetComputing: Computing) { + text = ObjectMapper().readValue(String(noteFileContents, Charset.forName(format)), JSON.Bmson::class.java) + val title = text.info.title + val titleAssister0 = text.info.subtitle + val titleAssister1 = text.info.chart_name + targetComputing.title = + "$title${if (titleAssister0.isEmpty() || title.endsWith(titleAssister0)) "" else " $titleAssister0"}${ + if (titleAssister1.isEmpty() || title.endsWith( + titleAssister1 + ) + ) "" else " $titleAssister1" + }" + targetComputing.artist = + mutableListOf(text.info.artist, *text.info.subartists.toTypedArray()).joinToString(" / ") + targetComputing.genre = text.info.genre + val levelTextValue = abs(text.info.level) + if (levelTextValue < 100) { + targetComputing.levelText = "LV. $levelTextValue" + } else { + val levelText = levelTextValue.toString() + targetComputing.levelText = + "LV. ${levelText.substring(0.coerceAtLeast(levelText.length - 2), levelText.length)}" + } + val longNoteVariety = text.info.ln_type + targetComputing.isAutoLongNote = longNoteVariety != 2L && longNoteVariety != 3L + when (text.info.mode_hint) { + "generic-4keys" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_4 + "generic-5keys", "popn-5k" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_5 + "generic-6keys" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_6 + "generic-8keys" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_8 + "generic-9keys", "popn-9k" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_9 + "generic-10keys" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_10 + "beat-5k" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_51 + "beat-7k" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_71 + "beat-10k" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_102 + "beat-14k" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_142 + "keyboard-24k" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_242 + "keyboard-24k-double" -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_484 + else -> targetComputing.inputMode = Component.InputMode.INPUT_MODE_7 + } + targetComputing.judgmentStage = 70 / (0.03 * text.info.judge_rank + 7) + targetComputing.hitPointsValue = text.info.total / 10000 + val bmsonPositionSet = TreeSet() + bmsonPositionSet.add(0L) + var audioCount = 0 + for (audioChannel in text.sound_channels) { + if (audioChannel.name.isNotEmpty()) { + ++audioCount + } + for (note in audioChannel.notes) { + var bmsonPosition = note.y + val input = getBMSONInput(note.x.toInt(), targetComputing.inputMode) + val isInput = input > 0 + val isLongInput = note.l > 0L + bmsonPositionSet.add(bmsonPosition) + if (isInput) { + positionStandNoteCountMap[bmsonPosition.toDouble()] = + positionStandNoteCountMap.getOrDefault(bmsonPosition.toDouble(), 0) + 1 + val isAutoableInput = + ArrayUtils.indexOf(Component.AUTOABLE_INPUTS[targetComputing.inputMode.ordinal], input) != -1 + targetComputing.totalNotes += 1 + if (isAutoableInput) { + targetComputing.autoableNotes += 1 + } + if (isLongInput) { + targetComputing.longNotes += 1 + } + } + if (isLongInput) { + bmsonPosition += note.l + bmsonPositionSet.add(bmsonPosition) + } + highestPosition = highestPosition.coerceAtLeast(bmsonPosition.toDouble()) + } + } + if (targetComputing.totalNotes == 0) { + targetComputing.inputMode = Component.InputMode.INPUT_MODE_51 + } + for (trapChannel in text.sound_channels) { + for (note in trapChannel.notes) { + val bmsonPosition = note.y + val input = getBMSONInput(note.x.toInt(), targetComputing.inputMode) + val isInput = input > 0 + bmsonPositionSet.add(bmsonPosition) + if (isInput) { + ++targetComputing.trapNotes + } + highestPosition = highestPosition.coerceAtLeast(bmsonPosition.toDouble()) + } + } + text.bga.bga_events.forEach { + bmsonPositionSet.add(it.y) + } + text.bga.layer_events.forEach { + bmsonPositionSet.add(it.y) + } + text.bga.poor_events.forEach { + bmsonPositionSet.add(it.y) + } + text.lines.forEach { + val bmsonPosition = it.y + bmsonPositionSet.add(bmsonPosition) + highestPosition = highestPosition.coerceAtLeast(bmsonPosition.toDouble()) + } + text.bpm_events.forEach { + val bmsonPosition = it.y + bpmValues[bmsonPosition.toDouble()] = it.bpm + bmsonPositionSet.add(bmsonPosition) + } + val bmsonPositionStopMap = TreeMap() + text.stop_events.forEach { + val bmsonPosition = it.y + bmsonPositionStopMap[bmsonPosition] = bmsonPositionStopMap.getOrDefault(bmsonPosition, 0L) + it.duration + bmsonPositionSet.add(bmsonPosition) + } + targetComputing.levyingBPM = text.info.init_bpm + valueComponent = Component(targetComputing.levyingBPM) + res = text.info.resolution * 4L + var lastBMSONPosition = 0L + var lastWait = 0.0 + var lastBPM = targetComputing.levyingBPM + for (bmsonPosition in bmsonPositionSet) { + bmsonPositionLogicalYMap[bmsonPosition] = + bmsonPosition.toDouble() * -valueComponent.logicalYMeter / res.toDouble() + lastWait += valueComponent.millisMeter * (bmsonPosition - lastBMSONPosition).toDouble() / res.toDouble() + bpmValues[bmsonPosition.toDouble()]?.let { + lastBPM = it + valueComponent.setBPM(it) + } + waitValues[bmsonPosition.toDouble()] = lastWait + lastBMSONPosition = bmsonPosition + bmsonPositionStopMap[bmsonPosition]?.let { + lastWait += valueComponent.millisMeter * it.toDouble() / res.toDouble() + bmsonPositionBPMMap[bmsonPosition] = lastBPM + } + } + targetComputing.isBanned = audioCount < 2 || targetComputing.totalNotes == 0 + targetComputing.noteVariety = Component.NoteVariety.BMSON + } + + override fun handleCompile(defaultComputer: DefaultCompute) { + handleCompile(defaultComputer as Computing) + text.lines.forEach { + val bmsonPosition = it.y + val logicalY = valueComponent.levyingHeight + bmsonPositionLogicalYMap[bmsonPosition]!! + val wait = waitValues[bmsonPosition.toDouble()]!! + notes.add(MeterNote(logicalY, wait)) + } + text.sound_channels.forEach { + it.notes.sortedBy { note -> note.y }.forEach { note -> + val bmsonPosition = note.y + val logicalY = valueComponent.levyingHeight + bmsonPositionLogicalYMap[bmsonPosition]!! + val wait = waitValues[bmsonPosition.toDouble()]!! + val input = getBMSONInput(note.x.toInt(), defaultComputer.inputMode) + if (input > 0) { + if (note.l > 0L) { + notes.add( + LongNote( + logicalY, + wait, + input, + waitValues[(bmsonPosition + note.l).toDouble()]!! - wait, + logicalY - (valueComponent.levyingHeight + bmsonPositionLogicalYMap[bmsonPosition + note.l]!!) + ) + ) + } else { + notes.add(InputNote(logicalY, wait, input)) + } + } + } + } + text.mine_channels.forEach { + it.notes.sortedBy { note -> note.y }.forEach { note -> + val input = getBMSONInput(note.x.toInt(), defaultComputer.inputMode) + if (input > 0) { + val bmsonPosition = note.y + val logicalY = valueComponent.levyingHeight + bmsonPositionLogicalYMap[bmsonPosition]!! + val wait = waitValues[bmsonPosition.toDouble()]!! + notes.add(TrapNote(logicalY, wait, input)) + } + } + } + bpmValues.forEach { + waitBPMMap[waitValues[it.key]!!] = it.value + } + text.stop_events.forEach { + val bmsonPosition = it.y + bmsonPositionBPMMap[bmsonPosition]?.let { bpm -> + val wait = waitValues[bmsonPosition.toDouble()]!! + valueComponent.setBPM(bpm) + waitStopMap[wait] = 0.0 + waitStopMap[wait + valueComponent.millisMeter * it.duration.toDouble() / res.toDouble()] = bpm + } + } + } + + private fun getBMSONInput(x: Int, inputMode: Component.InputMode): Int { + when (inputMode) { + Component.InputMode.INPUT_MODE_4 -> { + when (x) { + 1, 2, 3, 4 -> { + return x + } + } + } + + Component.InputMode.INPUT_MODE_5 -> { + when (x) { + 1, 2, 3, 4, 5 -> { + return x + } + } + } + + Component.InputMode.INPUT_MODE_6 -> { + when (x) { + 1, 2, 3, 4, 5, 6 -> { + return x + } + } + } + + Component.InputMode.INPUT_MODE_7 -> { + when (x) { + 1, 2, 3, 4, 5, 6, 7 -> { + return x + } + } + } + + Component.InputMode.INPUT_MODE_8 -> { + when (x) { + 1, 2, 3, 4, 5, 6, 7, 8 -> { + return x + } + } + } + + Component.InputMode.INPUT_MODE_9 -> { + when (x) { + 1, 2, 3, 4, 5, 6, 7, 8, 9 -> { + return x + } + } + } + + Component.InputMode.INPUT_MODE_10 -> { + when (x) { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 -> { + return x + } + } + } + + Component.InputMode.INPUT_MODE_51 -> { + when (x) { + 8 -> { + return 1 + } + + 1, 2, 3, 4, 5 -> { + return x + 1 + } + } + } + + Component.InputMode.INPUT_MODE_71 -> { + when (x) { + 8 -> { + return 1 + } + + 1, 2, 3, 4, 5, 6, 7 -> { + return x + 1 + } + } + } + + Component.InputMode.INPUT_MODE_102 -> { + when (x) { + 8 -> { + return 1 + } + + 16 -> { + return 12 + } + + 1, 2, 3, 4, 5 -> { + return x + 1 + } + + 9, 10, 11, 12, 13 -> { + return x - 2 + } + } + } + + Component.InputMode.INPUT_MODE_142 -> { + when (x) { + 8 -> { + return 1 + } + + 1, 2, 3, 4, 5, 6, 7 -> { + return x + 1 + } + + 9, 10, 11, 12, 13, 14, 15, 16 -> { + return x + } + } + } + + Component.InputMode.INPUT_MODE_242 -> { + when (x) { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 -> { + return x + 1 + } + + 25 -> { + return 1 + } + + 26 -> { + return 26 + } + } + } + + Component.InputMode.INPUT_MODE_484 -> { + when (x) { + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24 -> { + return x + 2 + } + + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50 -> { + return x + } + + 25 -> { + return 1 + } + + 26 -> { + return 2 + } + + 51 -> { + return 51 + } + + 52 -> { + return 52 + } + } + } + + else -> Unit + } + return 0 + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/BaseCompiler.kt b/src/main/kotlin/net/taehui/twilight/BaseCompiler.kt new file mode 100644 index 0000000..15b3388 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/BaseCompiler.kt @@ -0,0 +1,187 @@ +package net.taehui.twilight + +import com.fasterxml.jackson.core.JacksonException +import com.ibm.icu.text.CharsetDetector +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute +import net.taehui.twilight.note.BaseNote +import net.taehui.twilight.system.Configure +import java.io.ByteArrayInputStream +import java.util.* +import kotlin.math.max + + +abstract class BaseCompiler(val noteFileContents: ByteArray, val format: String) : Logger { + val notes = mutableListOf() + val waitBPMMap = TreeMap() + val waitStopMap = TreeMap() + val bpmValues = TreeMap() + val positionStandNoteCountMap = TreeMap() + val waitMultiplierMap = TreeMap(Comparator.reverseOrder()) + val waitValues = TreeMap() + lateinit var valueComponent: Component + var highestPosition = 0.0 + + private fun getWaitValue(waitPosition: Double): Double { + return waitValues[waitPosition]!! + } + + fun onCompiled(targetComputing: Computing) { + if (bpmValues.isNotEmpty()) { + val bpmWaitMap = mutableMapOf() + var lastBPM = targetComputing.levyingBPM + var lastBPMPosition = 0.0 + bpmValues.forEach { + if (it.key <= highestPosition) { + bpmWaitMap[lastBPM] = bpmWaitMap.getOrDefault( + lastBPM, + 0.0 + ) + waitValues[it.key]!! - waitValues[lastBPMPosition]!! + lastBPMPosition = it.key + lastBPM = it.value + } + } + bpmWaitMap[lastBPM] = bpmWaitMap.getOrDefault( + lastBPM, + 0.0 + ) + waitValues[highestPosition]!! - waitValues[lastBPMPosition]!! + val longestWait = bpmWaitMap.values.max() + val longestBPMs = bpmWaitMap.entries + .filter { it.value == longestWait } + .map { it.key } + if (longestBPMs.isNotEmpty()) { + val validBPMs = longestBPMs.filter { it > 0.5 && it < 65536 } + if (validBPMs.isNotEmpty()) { + targetComputing.bpm = validBPMs.min() + } else { + val validBPMWaitValues: List> = bpmWaitMap.entries.filter { + it.key > 0.5 && it.key < 65536 + } + if (validBPMWaitValues.isNotEmpty()) { + val validLongestWait = validBPMWaitValues.maxOfOrNull { it.value } + targetComputing.bpm = validBPMWaitValues.minBy { it.value == validLongestWait }.key + } else { + val bpm = longestBPMs.max() + if (bpm % 100001 == 0.0) { + targetComputing.bpm = bpm / 100001 + } else { + targetComputing.bpm = bpm + } + } + } + } + } else { + if (targetComputing.levyingBPM % 100001 == 0.0) { + targetComputing.bpm = targetComputing.levyingBPM / 100001 + } else { + targetComputing.bpm = targetComputing.levyingBPM + } + } + targetComputing.length = getWaitValue(highestPosition) + if (positionStandNoteCountMap.isNotEmpty()) { + + val positionStandNoteCounts = mutableListOf>() + positionStandNoteCounts.addAll(positionStandNoteCountMap.toList()) + var lowestPosition = 0 + var lowestWait = getWaitValue(positionStandNoteCounts[lowestPosition].first) + var lowestCount = positionStandNoteCounts[lowestPosition].second + var highestInputCount = lowestCount + var i = 1 + while (i < positionStandNoteCounts.size) { + val (waitPosition, value) = positionStandNoteCounts[i] + if (getWaitValue(waitPosition) - lowestWait < 1000.0) { + highestInputCount += value + ++i + } else { + targetComputing.highestInputCount = max(highestInputCount, targetComputing.highestInputCount) + highestInputCount -= lowestCount + ++lowestPosition + lowestWait = getWaitValue(positionStandNoteCounts[lowestPosition].first) + lowestCount = positionStandNoteCounts[lowestPosition].second + } + } + targetComputing.highestInputCount = max(highestInputCount, targetComputing.highestInputCount) + } + } + + fun onCompiled(defaultComputer: DefaultCompute) { + defaultComputer.totalNotes = notes.stream() + .map { if (it.hasStand()) if (it.longWait > 0.0) 2 else 1 else 0 } + .reduce(0) { o1, t2 -> o1 + t2 } + + defaultComputer.waitBPMMap.putAll(waitBPMMap) + waitStopMap.forEach { (wait, stop) -> + val lastBPMs = defaultComputer.waitBPMMap.filter { it.key <= wait }.toList() + val lastBPM = if (lastBPMs.isNotEmpty()) lastBPMs.last().second else defaultComputer.levyingBPM + valueComponent.setBPM(lastBPM) + defaultComputer.waitBPMMap[wait] = 0.0 + defaultComputer.waitBPMMap[wait + valueComponent.millisMeter * stop] = lastBPM + } + var lastWait = Double.MAX_VALUE + waitMultiplierMap.forEach { (wait, multiplier) -> + val lastBPMs = defaultComputer.waitBPMMap.filter { it.key <= wait }.toList() + defaultComputer.waitBPMMap[wait] = + if (lastBPMs.isNotEmpty()) lastBPMs.last().second else defaultComputer.levyingBPM + defaultComputer.waitBPMMap.keys.filter { wait <= it && it < lastWait }.forEach { + defaultComputer.waitBPMMap[it] = defaultComputer.waitBPMMap[it]!! * multiplier + } + lastWait = wait + } + + defaultComputer.length = maxOf((notes.filter { it.hasStand() }.maxOfOrNull { it.wait + it.longWait } ?: 0.0), + defaultComputer.waitAudioNoteMap.stream().max(Comparator.naturalOrder()).orElse(0.0), + defaultComputer.waitMediaNoteMap.stream().max(Comparator.naturalOrder()).orElse(0.0) + ) + + notes.sort() + notes.forEach { + defaultComputer.notes.add(it) + it.noteID = defaultComputer.notes.size - 1 + } + } + + abstract fun handleCompile(targetComputing: Computing) + + abstract fun handleCompile(defaultComputer: DefaultCompute) + + companion object { + fun handleCompile(noteFileContents: ByteArray): Computing { + val targetComputing = Computing() + ByteArrayInputStream(noteFileContents).use { + val formatComputer = CharsetDetector() + formatComputer.setText(it) + val formats = formatComputer.detectAll() + val format = if (formats[0].confidence >= 87.5) formats[0].name else Configure.db.format + var targetCompiler: BaseCompiler + try { + targetCompiler = BMSONCompiler(noteFileContents, format) + targetCompiler.handleCompile(targetComputing) + } catch (e: JacksonException) { + targetCompiler = BMSCompiler(noteFileContents, format) + targetCompiler.handleCompile(targetComputing) + } + targetCompiler.onCompiled(targetComputing) + } + return targetComputing + } + + fun handleCompile(defaultComputer: DefaultCompute, noteFileContents: ByteArray) { + ByteArrayInputStream(noteFileContents).use { + val formatComputer = CharsetDetector() + formatComputer.setText(it) + val formats = formatComputer.detectAll() + val format = if (formats[0].confidence > 50) formats[0].name else Configure.db.format + var targetCompiler: BaseCompiler + try { + targetCompiler = BMSONCompiler(noteFileContents, format) + targetCompiler.handleCompile(defaultComputer) + } catch (e: Throwable) { + targetCompiler = BMSCompiler(noteFileContents, format) + targetCompiler.handleCompile(defaultComputer) + } + targetCompiler.onCompiled(defaultComputer as Computing) + targetCompiler.onCompiled(defaultComputer) + } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/BundleIO.kt b/src/main/kotlin/net/taehui/twilight/BundleIO.kt new file mode 100644 index 0000000..d8791b7 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/BundleIO.kt @@ -0,0 +1,71 @@ +package net.taehui.twilight + +import org.apache.commons.io.FileUtils +import org.apache.commons.io.FilenameUtils +import java.nio.ByteBuffer +import java.nio.channels.AsynchronousFileChannel +import java.nio.file.Files +import java.nio.file.Path +import java.nio.file.Paths +import java.nio.file.StandardCopyOption + +class BundleIO( + private val bundleFilePath: Path, + val fileChannel: AsynchronousFileChannel, + val bundleName: String, + val bundleVariety: BundleVariety, + val etc: String, + val bundleFileName: String, + private val isSaveAs: Boolean +) : AutoCloseable { + enum class BundleVariety(val value: Int, val fileVariety: String) { + DEFAULT_UI(-2, ".zip"), DEFAULT_NOTE(-1, ".zip"), UI(1, ".zip"), QWILIGHT( + 2, + ".zip" + ), + EVENT_NOTE(3, ".txt"), NOTE(4, ".zip"), NET(5, ".zip"); + + companion object { + fun getBundleVariety(value: Int): BundleVariety { + return when (value) { + 1 -> UI + 2 -> QWILIGHT + 3 -> EVENT_NOTE + 4 -> NOTE + 5 -> NET + else -> throw IllegalArgumentException(value.toString()) + } + } + } + } + + val data: ByteBuffer = ByteBuffer.allocateDirect(SEND_UNIT) + var filePosition = 0 + + fun setFileVariety() { + Files.move( + bundleFilePath, + Paths.get(FilenameUtils.removeExtension(bundleFilePath.toString()) + bundleVariety.fileVariety), + StandardCopyOption.REPLACE_EXISTING + ) + } + + fun saveFilePosition(filePosition: Int) { + this.filePosition += filePosition + } + + fun getBundleLength(): Long { + return fileChannel.size() + } + + override fun close() { + fileChannel.close() + if (isSaveAs) { + FileUtils.deleteQuietly(bundleFilePath.toFile()) + } + } + + companion object { + const val SEND_UNIT = 1024 * 1024 + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/Computing.kt b/src/main/kotlin/net/taehui/twilight/Computing.kt new file mode 100644 index 0000000..168762c --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/Computing.kt @@ -0,0 +1,30 @@ +package net.taehui.twilight + +import net.taehui.twilight.awilight.Component + +open class Computing { + var noteID = "" + var noteVariety = Component.NoteVariety.BMS + var title = "" + var artist = "" + var genre = "" + var levelText = "" + var level = 0 + var wantLevelID = "" + var judgmentStage = 5.0 + var hitPointsValue = 0.01 + var levyingBPM = Component.STANDARD_BPM + var isAutoLongNote = true + var totalNotes = 0 + var longNotes = 0 + var autoableNotes = 0 + var trapNotes = 0 + var highestInputCount = 0 + var length = 0.0 + var bpm = 0.0 + var lowestBPM = 0.0 + var highestBPM = 0.0 + var inputMode = Component.InputMode.INPUT_MODE_51 + var isBanned = false + var isSalt = false +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/HCDataHandler.kt b/src/main/kotlin/net/taehui/twilight/HCDataHandler.kt new file mode 100644 index 0000000..f467c2c --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/HCDataHandler.kt @@ -0,0 +1,10 @@ +package net.taehui.twilight + +import org.apache.hc.client5.http.impl.classic.AbstractHttpClientResponseHandler +import org.apache.hc.core5.http.HttpEntity + +class HCDataHandler : AbstractHttpClientResponseHandler() { + override fun handleEntity(entity: HttpEntity): ByteArray { + entity.content.use { return it.readAllBytes() } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/JSON.kt b/src/main/kotlin/net/taehui/twilight/JSON.kt new file mode 100644 index 0000000..ace4e6f --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/JSON.kt @@ -0,0 +1,629 @@ +package net.taehui.twilight + +import com.fasterxml.jackson.annotation.JsonCreator +import com.fasterxml.jackson.annotation.JsonIgnoreProperties +import com.fasterxml.jackson.annotation.JsonProperty +import net.taehui.twilight.awilight.Component +import java.sql.ResultSet + +class JSON { + @JsonIgnoreProperties(ignoreUnknown = true) + data class Bmson( + val bga: BGA = BGA(), + val bpm_events: List = mutableListOf(), + val info: BmsonInfo = BmsonInfo(), + val lines: List = mutableListOf(), + val mine_channels: List = mutableListOf(), + val sound_channels: List = mutableListOf(), + val stop_events: List = mutableListOf() + ) { + @JsonIgnoreProperties(ignoreUnknown = true) + data class BGA( + val bga_events: List = mutableListOf(), + val bga_header: List = mutableListOf(), + val layer_events: List = mutableListOf(), + val poor_events: List = mutableListOf() + ) { + @JsonIgnoreProperties(ignoreUnknown = true) + data class BGAEvent( + val y: Long = 0L + ) + } + + @JsonIgnoreProperties(ignoreUnknown = true) + data class BPMEvent( + val bpm: Double = 0.0, + val y: Long = 0L + ) + + @JsonIgnoreProperties(ignoreUnknown = true) + data class BmsonInfo( + val artist: String = "", + val chart_name: String = "", + val genre: String = "", + val init_bpm: Double = 130.0, + val judge_rank: Double = 100.0, + val level: Long = 0L, + val ln_type: Long = 1L, + val mode_hint: String = "beat-7k", + val resolution: Long = 240L, + val subartists: List = mutableListOf(), + val subtitle: String = "", + val title: String = "", + val total: Double = 100.0 + ) + + @JsonIgnoreProperties(ignoreUnknown = true) + data class BarLine( + val y: Long = 0L + ) + + @JsonIgnoreProperties(ignoreUnknown = true) + data class SoundChannel( + val name: String = "", + val notes: List = mutableListOf() + ) { + @JsonIgnoreProperties(ignoreUnknown = true) + data class Note( + val damage: Double = 0.0, + val l: Long = 0L, + val x: Long = 0L, + val y: Long = 0L + ) + } + + @JsonIgnoreProperties(ignoreUnknown = true) + data class StopEvent( + val duration: Long, + val y: Long + ) + } + + @JsonIgnoreProperties(ignoreUnknown = true) + data class BMSTable( + val name: String = "", + val symbol: String = "", + val data_url: String = "" + ) + + @JsonIgnoreProperties(ignoreUnknown = true) + data class BMSTableData( + val md5: String = "", + val level: String = "", + val sha256: String = "", + ) + + @JsonIgnoreProperties(ignoreUnknown = true) + data class N2MT( + val message: Message = Message() + ) { + @JsonIgnoreProperties(ignoreUnknown = true) + data class Message( + val result: Result = Result() + ) { + @JsonIgnoreProperties(ignoreUnknown = true) + data class Result( + val translatedText: String = "" + ) + } + } + + class QwilightEstablish { + var qwilightName = "" + var hash = "" + var date = "" + var language = "" + var amd64 = "" + var os = "" + var ram = "" + var vga = "" + var m2 = "" + var audio = "" + var tv = "" + var lan = "" + } + + class TwilightEstablish { + var avatarID = "" + var avatarName = "" + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class TaehuiGetTotem { + var totem = "" + var avatarID = "" + var avatarName = "" + var level = 0 + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class TaehuiTotem { + var avatarID = "" + var avatarName = "" + var level = 0 + } + + class QwilightSignIn { + var avatarID = "" + var avatarCipher = "" + } + + class QwilightEnterSite { + var siteID = "" + var siteCipher = "" + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class TwilightEnterSite { + var siteID = "" + + @JvmField + var isNetSite = false + + var noteID = "" + var noteIDs: Array? = null + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class TwilightLevyNet { + var siteID = "" + var noteIDs: Array = emptyArray() + var handlerID = "" + } + + class TwilightQuitNet { + var handlerID = "" + var quitNetItems: Array? = null + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class TwilightCallSiteAvatar { + var siteID = "" + var siteHand = "" + var situationValue = 0 + var data: Array = emptyArray() + + @JsonIgnoreProperties(ignoreUnknown = true) + class TwilightCallSiteAvatarItem { + var avatarID = "" + var avatarConfigure = 0 + } + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class TwilightCallSiteNet { + var siteID = "" + var noteID = "" + var noteIDs: Array = emptyArray() + } + + class QwilightSiteYell { + var siteID = "" + var siteYell = "" + var target = "" + } + + class QwilightGetSiteYells { + var siteID = "" + var siteYellID = 0 + } + + class QwilightSaveAsBundle { + var bundleVariety = 0 + var bundleEntryPath = "" + var bundleName = "" + var etc = "" + } + + class QwilightSetBundle { + var bundleName = "" + var bundleCompetence = 0 + } + + class QwilightNewSite { + var siteName = "" + var siteCipher = "" + + @JvmField + var isNetSite = false + var data: Any? = null + var noteID = "" + var noteIDs: Array? = null + var title = "" + var artist = "" + var genre = "" + var levelText = "" + var level = 0 + var wantLevelID = "" + var judgmentStage = 0.0 + var hitPointsValue = 0.0 + var totalNotes = 0 + var longNotes = 0 + var autoableNotes = 0 + var trapNotes = 0 + var highestInputCount = 0 + var length = 0.0 + var bpm = 0.0 + var lowestBPM = 0.0 + var highestBPM = 0.0 + + @JvmField + var isAutoLongNote = false + var inputMode = Component.InputMode.INPUT_MODE_51 + var bundleEntryPath = "" + var allowedPostableItems = emptyArray() + } + + class QwilightSetModeComponent { + var siteID = "" + var data = Any() + } + + class QwilightSetAvatarGroup { + var siteID = "" + var avatarGroup = 0 + } + + class QwilightSetValidNetMode { + var siteID = "" + var validNetMode = 0 + } + + class QwilightSetAllowedPostableItems { + var siteID = "" + var allowedPostableItems = emptyArray() + } + + class QwilightSetConfigure { + var silentSiteCompetence = 0 + var toNotifyUbuntuCompetence = 0 + var defaultBundleCompetence = 0 + var ioCompetence = 0 + var toNotifySaveBundleCompetence = 0 + } + + class QwilightSaveBundle { + var avatarID = "" + var bundleName = "" + var etc = "" + } + + class QwilightCallIO { + var avatarID = "" + var handlerID = "" + var ioMillis = 0.0 + } + + class TwilightCallIO { + var avatarID = "" + var handlerID = "" + var ioMillis = 0.0 + } + + class QwilightIONot { + var avatarID = "" + var handlerID = "" + } + + class QwilightCommentary { + var noteID = "" + var commentary = "" + } + + class QwilightSetFavor { + var noteID = "" + var favor: Boolean? = null + } + + class QwilightCallIOComponent { + var noteID = "" + var avatarID = "" + var handlerID = "" + + @JvmField + var isFailMode = false + var data = Any() + var ioHandlerID = "" + var ioMillis = 0.0 + var targetIOMillis = 0.0 + } + + + class QwilightCompiledIO { + var avatarID = "" + var handlerID = "" + + @JvmField + var isCompiled = false + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class TwilightCompiledIO { + var avatarID = "" + var handlerID = "" + + @JvmField + var isCompiled = false + } + + class QwilightLevyIO { + var avatarIDs = emptyArray() + var handlerID = "" + var levyingWait = 0.0 + var lastStand = 0 + + @JvmField + var isF = false + var multiplier = 0.0 + var audioMultiplier = 0.0 + var ioMillis = 0.0 + } + + class QwilightIOPause { + var avatarIDs = emptyArray() + var handlerID = "" + + @JvmField + var isPaused = false + } + + class QwilightIOQuit { + var avatarIDs = emptyArray() + var handlerID = "" + + @JvmField + var isBanned = false + } + + class QwilightComment { + var dataID = 0 + var multiplier = 0.0 + var autoMode = 0 + var noteSaltMode = 0 + var audioMultiplier = 0.0 + var faintNoteMode = 0 + var judgmentMode = 0 + var hitPointsMode = 0 + var noteMobilityMode = 0 + var longNoteMode = 0 + var inputFavorMode = 0 + var noteModifyMode = 0 + var lowestJudgmentConditionMode = 0 + var stand = 0 + var highestBand = 0 + var point = 0.0 + var salt = 0 + + @JvmField + var isPaused = false + + var inputFlags = 0 + var inputMode = Component.InputMode.INPUT_MODE_51 + } + + class QwilightValveComment { + var dataID = 0 + var stand = 0 + var hitPointsMode = 0 + } + + class QwilightSetSituation { + var situationValue = 0 + var situationText = "" + } + + class QwilightExileAvatar { + var siteID = "" + var avatarID = "" + } + + class QwilightCompiled { + var siteID = "" + var handlerID = "" + + @JvmField + var isCompiled = false + } + + class QwilightCallNet { + var siteID = "" + var handlerID = "" + var avatarNetStatus = 0 + var stand = 0 + var highestBand = 0 + var point = 0.0 + var hitPoints = 0.0 + + @JvmField + var isFailed = false + var lastJudged = 0 + var drawings: Array? = null + var drawingComponent: Any? = null + var multiplier = 0.0 + var title = "" + var artist = "" + var genre = "" + var level = 0 + var levelText = "" + var autoMode = 0 + var noteSaltMode = 0 + var audioMultiplier = 0.0 + var faintNoteMode = 0 + var hitPointsMode = 0 + var judgmentMode = 0 + var noteMobilityMode = 0 + var inputFavorMode = 0 + var longNoteMode = 0 + var noteModifyMode = 0 + var bpmMode = 0 + var waveMode = 0 + var setNoteMode = 0 + var lowestJudgmentConditionMode = 0 + var totalNotes = 0 + var judgmentStage = 0.0 + var hitPointsValue = 0.0 + var highestInputCount = 0 + var length = 0.0 + var bpm = 0.0 + var inputMode = Component.InputMode.INPUT_MODE_51 + } + + class QwilightSetNoteFile { + var siteID = "" + var noteID = "" + var noteIDs = emptyArray() + var title = "" + var artist = "" + var genre = "" + var levelText = "" + var level = 0 + var wantLevelID = "" + var judgmentStage = 0.0 + var hitPointsValue = 0.0 + var totalNotes = 0 + var longNotes = 0 + var autoableNotes = 0 + var trapNotes = 0 + var highestInputCount = 0 + var length = 0.0 + var bpm = 0.0 + var lowestBPM = 0.0 + var highestBPM = 0.0 + + @JvmField + var isAutoLongNote = false + var inputMode = Component.InputMode.INPUT_MODE_51 + var bundleEntryPath = "" + } + + class QwilightSetSiteHand { + var siteID = "" + var avatarID = "" + } + + class QwilightSetSiteName { + var siteID = "" + var siteName = "" + } + + @JsonIgnoreProperties(ignoreUnknown = true) + class TwilightWwwSite { + var siteID = "" + var siteConfigure = 0 + var hasCipher = false + var avatarCount = 0 + } + + class TwilightWwwTitle(var title: String, var titleColor: String) + + data class TwilightSiteYell @JsonCreator constructor( + @JsonProperty("siteID") + val siteID: String, + @JsonProperty("avatarID") + val avatarID: String, + @JsonProperty("avatarName") + val avatarName: String, + @JsonProperty("date") + val date: Long, + @JsonProperty("siteYell") + val siteYell: String, + @JsonProperty("siteYellID") + val siteYellID: Int, + @JsonProperty("target") + val target: String + ) { + constructor(siteID: String, siteYellItem: SiteYell, target: String) : this( + siteID, + siteYellItem.avatarID, + siteYellItem.avatarName, + siteYellItem.date, + siteYellItem.siteYell, + siteYellItem.siteYellID, + target + ) + } + + data class TwilightCommentSiteYell @JsonCreator constructor( + @JsonProperty("avatarID") + val avatarID: String, + @JsonProperty("avatarName") + val avatarName: String, + @JsonProperty("artist") + val artist: String, + @JsonProperty("title") + val title: String, + @JsonProperty("genre") + val genre: String, + @JsonProperty("levelText") + val levelText: String, + @JsonProperty("level") + val level: Int, + @JsonProperty("stand") + val stand: Int, + @JsonProperty("hitPointsMode") + val hitPointsMode: Int + ) + + data class TwilightInviteSiteYell @JsonCreator constructor( + @JsonProperty("avatarName") + val avatarName: String, + @JsonProperty("siteID") + val siteID: String, + @JsonProperty("siteName") + val siteName: String, + ) + + data class TwilightTVSiteYell @JsonCreator constructor( + @JsonProperty("href") + val href: String, + @JsonProperty("title") + val title: String, + @JsonProperty("text") + val text: String, + ) + + class QwilightWwwLevel { + var noteID = "" + var stand = 0 + var point = 0.0 + var highestBand = 0 + var judgments = emptyArray() + var autoMode = 0 + var noteSaltMode = 0 + var faintNoteMode = 0 + var judgmentMode = 0 + var hitPointsMode = 0 + var noteMobilityMode = 0 + var longNoteMode = 0 + var inputFavorMode = 0 + var noteModifyMode = 0 + var bpmMode = 0 + var waveMode = 0 + var setNoteMode = 0 + var lowestJudgmentConditionMode = 0 + } + + class TwilightWwwAvatarAbility(rs: ResultSet, i: Double) { + val noteID: String + val noteVariety: Int + val artist: String + val title: String + val genre: String + val levelText: String + val level: Int + val stand: Int + val ability: Double + + init { + noteID = rs.getString("Note_ID") + noteVariety = rs.getInt("Note_Variety") + artist = rs.getString("Artist") + title = rs.getString("Title") + genre = rs.getString("Genre") + levelText = rs.getString("Level_Text") + level = rs.getInt("Level") + stand = rs.getInt("Stand") + ability = rs.getDouble("Value") * i + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/Logger.kt b/src/main/kotlin/net/taehui/twilight/Logger.kt new file mode 100644 index 0000000..f0834d4 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/Logger.kt @@ -0,0 +1,82 @@ +package net.taehui.twilight + +import com.fasterxml.jackson.core.JsonProcessingException +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.EventClass +import org.slf4j.LoggerFactory +import java.util.concurrent.CompletableFuture + +interface Logger { + fun logInfo(toNotify: String) { + LoggerFactory.getLogger(javaClass).info(toNotify) + } + + fun logFault(e: Throwable) { + LoggerFactory.getLogger(javaClass).error(Utility.getFault(e)) + } + + fun logValueFuture(onHandle: () -> T): CompletableFuture { + return CompletableFuture.supplyAsync { + try { + onHandle() + } catch (e: Throwable) { + logFault(e) + throw e + } + } + } + + fun logFuture(onHandle: () -> Unit): CompletableFuture { + return CompletableFuture.runAsync { + try { + onHandle() + } catch (e: Throwable) { + logFault(e) + throw e + } + } + } + + fun logEvent(event: EventClass.Event) { + fun logEventImpl(event: EventClass.Event) { + logInfo((if (event.dataList.isEmpty()) event else EventClass.Event.newBuilder().apply { + eventID = event.eventID + text = event.text + }.build()).toString()) + } + + val jm = ObjectMapper() + when (event.eventID) { + EventClass.Event.EventID.SIGN_IN -> { + try { + val text = jm.writeValueAsString(object { + val avatarID = jm.readValue(event.text, JSON.QwilightSignIn::class.java).avatarID + val avatarCipher = "*" + }) + logEventImpl(EventClass.Event.newBuilder().apply { + eventID = event.eventID + this.text = text + }.build()) + } catch (e: JsonProcessingException) { + logEventImpl(event) + } + } + + EventClass.Event.EventID.SAVING_BUNDLE -> Unit + EventClass.Event.EventID.SAVING_AS_BUNDLE -> Unit + EventClass.Event.EventID.IO_INPUT -> Unit + EventClass.Event.EventID.IO_JUDGE -> Unit + EventClass.Event.EventID.IO_NOTE_VISIBILITY -> Unit + EventClass.Event.EventID.IO_JUDGMENT_METER -> Unit + EventClass.Event.EventID.IO_MULTIPLIER -> Unit + EventClass.Event.EventID.IO_AUDIO_MULTIPLIER -> Unit + EventClass.Event.EventID.IO_PAUSE -> Unit + EventClass.Event.EventID.AUDIO_INPUT -> Unit + EventClass.Event.EventID.CALL_NET -> Unit + + else -> { + logEventImpl(event) + } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/NetItem.kt b/src/main/kotlin/net/taehui/twilight/NetItem.kt new file mode 100644 index 0000000..aa8e00d --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/NetItem.kt @@ -0,0 +1,120 @@ +package net.taehui.twilight + +import net.taehui.CommentClass +import net.taehui.EventClass +import net.taehui.twilight.awilight.Component + +class NetItem(val avatarID: String, val avatarName: String) { + companion object { + const val STAND_MODE = 0 + const val POINT_MODE = 1 + const val BAND_MODE = 2 + } + + var stand = 0 + var highestBand = 0 + var point = 1.0 + var avatarNetStatus = EventClass.Event.AvatarNetStatus.Default + var hitPoints = 0.0 + var failed = false + var lastJudged = 0 + var drawings: Collection = emptyList() + var drawingComponent: EventClass.Event.DrawingComponent = EventClass.Event.DrawingComponent.getDefaultInstance() + var comment: CommentClass.Comment? = null + var title = "" + var artist = "" + var genre = "" + var level = 0 + var levelText = "" + var wantLevelID = "" + var autoMode = 0 + var noteSaltMode = 0 + var audioMultiplier = 0.0 + var faintNoteMode = 0 + var hitPointsMode = 0 + var judgmentMode = 0 + var noteMobilityMode = 0 + var inputFavorMode = 0 + var longNoteMode = 0 + var noteModifyMode = 0 + var bpmMode = 0 + var waveMode = 0 + var setNoteMode = 0 + var lowestJudgmentConditionMode = 0 + var totalNotes = 0 + var judgmentStage = 0.0 + var hitPointsValue = 0.0 + var highestInputCount = 0 + var length = 0.0 + var bpm = 0.0 + var multiplier = 0.0 + var inputMode = Component.InputMode.INPUT_MODE_51 + var highestJudgment0 = -1.0 + var higherJudgment0 = -1.0 + var highJudgment0 = -1.0 + var lowJudgment0 = -1.0 + var lowerJudgment0 = -1.0 + var lowestJudgment0 = -1.0 + var highestJudgment1 = 1.0 + var higherJudgment1 = 1.0 + var highJudgment1 = 1.0 + var lowJudgment1 = 1.0 + var lowerJudgment1 = 1.0 + var lowestJudgment1 = 1.0 + + fun setValues(qwilightCallNet: EventClass.Event.QwilightCallNet, comment: CommentClass.Comment?) { + stand = qwilightCallNet.stand + highestBand = qwilightCallNet.highestBand + point = qwilightCallNet.point + hitPoints = qwilightCallNet.hitPoints + failed = qwilightCallNet.isFailed + lastJudged = qwilightCallNet.lastJudged + drawings = qwilightCallNet.drawingsList + drawingComponent = qwilightCallNet.drawingComponent + this.comment = comment + title = qwilightCallNet.title + artist = qwilightCallNet.artist + genre = qwilightCallNet.genre + level = qwilightCallNet.level + levelText = qwilightCallNet.levelText + wantLevelID = qwilightCallNet.wantLevelID + autoMode = qwilightCallNet.autoMode + noteSaltMode = qwilightCallNet.noteSaltMode + audioMultiplier = qwilightCallNet.audioMultiplier + faintNoteMode = qwilightCallNet.faintNoteMode + hitPointsMode = qwilightCallNet.hitPointsMode + judgmentMode = qwilightCallNet.judgmentMode + noteMobilityMode = qwilightCallNet.noteMobilityMode + inputFavorMode = qwilightCallNet.inputFavorMode + longNoteMode = qwilightCallNet.longNoteMode + noteModifyMode = qwilightCallNet.noteModifyMode + bpmMode = qwilightCallNet.bpmMode + waveMode = qwilightCallNet.waveMode + setNoteMode = qwilightCallNet.setNoteMode + lowestJudgmentConditionMode = qwilightCallNet.lowestJudgmentConditionMode + totalNotes = qwilightCallNet.totalNotes + judgmentStage = qwilightCallNet.judgmentStage + hitPointsValue = qwilightCallNet.hitPointsValue + highestInputCount = qwilightCallNet.highestInputCount + length = qwilightCallNet.length + bpm = qwilightCallNet.bpm + multiplier = qwilightCallNet.multiplier + inputMode = Component.InputMode.entries[qwilightCallNet.inputMode] + highestJudgment0 = qwilightCallNet.highestJudgment0 + higherJudgment0 = qwilightCallNet.higherJudgment0 + highJudgment0 = qwilightCallNet.highJudgment0 + lowJudgment0 = qwilightCallNet.lowJudgment0 + lowerJudgment0 = qwilightCallNet.lowerJudgment0 + lowestJudgment0 = qwilightCallNet.lowestJudgment0 + highestJudgment1 = qwilightCallNet.highestJudgment1 + higherJudgment1 = qwilightCallNet.higherJudgment1 + highJudgment1 = qwilightCallNet.highJudgment1 + lowJudgment1 = qwilightCallNet.lowJudgment1 + lowerJudgment1 = qwilightCallNet.lowerJudgment1 + lowestJudgment1 = qwilightCallNet.lowestJudgment1 + } + + fun setFailed() { + failed = false + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/NetSiteCommentItems.kt b/src/main/kotlin/net/taehui/twilight/NetSiteCommentItems.kt new file mode 100644 index 0000000..1ed87e9 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/NetSiteCommentItems.kt @@ -0,0 +1,3 @@ +package net.taehui.twilight + +class NetSiteCommentItems(val netItems: Map, val date: Long) \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/QwilightLogging.kt b/src/main/kotlin/net/taehui/twilight/QwilightLogging.kt new file mode 100644 index 0000000..b5ddba3 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/QwilightLogging.kt @@ -0,0 +1,35 @@ +package net.taehui.twilight + +import jakarta.mail.* +import jakarta.mail.internet.InternetAddress +import jakarta.mail.internet.MimeMessage +import net.taehui.twilight.system.Configure +import org.slf4j.LoggerFactory +import java.util.* + +class QwilightLogging(private val loggerID: String) : Logger { + override fun logInfo(toNotify: String) { + LoggerFactory.getLogger(javaClass).info("[{}] {}", loggerID, toNotify) + logFuture { + Transport.send(MimeMessage(Session.getDefaultInstance(Properties().apply { + put("mail.smtp.host", "localhost") + }, object : Authenticator() { + override fun getPasswordAuthentication(): PasswordAuthentication { + return PasswordAuthentication(Configure.fax.avatar, Configure.fax.auth) + } + })).apply { + setFrom(InternetAddress("Qwilight")) + addRecipient( + Message.RecipientType.TO, + InternetAddress(Configure.fax.remote) + ) + subject = loggerID + setText(toNotify) + }) + } + } + + override fun logFault(e: Throwable) { + LoggerFactory.getLogger(javaClass).error("[{}] {}", loggerID, Utility.getFault(e)) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/Site.kt b/src/main/kotlin/net/taehui/twilight/Site.kt new file mode 100644 index 0000000..a381ea0 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/Site.kt @@ -0,0 +1,1434 @@ +package net.taehui.twilight + +import com.fasterxml.jackson.databind.ObjectMapper +import com.google.protobuf.ByteString +import net.dv8tion.jda.api.entities.Member +import net.dv8tion.jda.api.events.message.MessageDeleteEvent +import net.dv8tion.jda.api.events.message.MessageReceivedEvent +import net.dv8tion.jda.api.events.message.MessageUpdateEvent +import net.taehui.CommentClass +import net.taehui.EventClass +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.system.* +import okhttp3.internal.toImmutableList +import org.apache.commons.io.FileUtils +import org.slf4j.LoggerFactory +import java.util.* +import java.util.concurrent.* +import java.util.stream.Collectors +import java.util.stream.Stream + +class Site : Logger { + enum class AvatarConfigure(val value: Int) { + DEFAULT(0), LEVYING(2), COMPILING(3), NET(4) + } + + enum class SiteSituation { + DEFAULT, COMPILING, NET + } + + enum class SiteMode { + DEFAULT, FAVOR, NET + } + + private val isEssential: Boolean + private val siteMode: SiteMode + private val avatarsCeiling: Int + private val siteID: UUID + private val siteCipher: String + private val isEditable: Boolean + private val avatarsCSX = Any() + private val avatars = mutableListOf() + private val avatarConfigures = mutableMapOf() + private val avatarGroups = mutableMapOf() + private val lastAudioInputMillis = mutableMapOf() + private val isAudioInputs = mutableMapOf() + private val siteHandQueue = LinkedList() + private val netSIteCommentItems = object : LinkedList() { + override fun add(element: NetSiteCommentItems): Boolean { + if (size >= 10) { + remove() + } + return super.add(element) + } + } + private val siteYells = LinkedList() + private val platformSiteYells = mutableMapOf>() + private val targetComputing = Computing() + private val isCallable: Boolean + private val isGetNotify: Boolean + private val isEnterQuitAware: Boolean + private val hasAvatar: Boolean + private val handler: ScheduledFuture<*>? + private val netItems = ConcurrentHashMap() + private var netDataMillis = 0L + private var siteHand: Avatar? = null + private var siteName = "" + private var handlerID = "" + private var siteNotify = "" + private var isFavorNoteFile = true + private var isFavorModeComponent = true + private var isFavorAudioMultiplier = false + private var isAutoSiteHand = false + private var modeComponentData: Any? = null + private var siteSituation = SiteSituation.DEFAULT + private var validHunterMode = 0 + private var validNetMode = 0 + private var allowedPostableItems = emptyArray() + private var noteID = "" + private var noteIDs: Array? = null + private var bundleEntryPath = "" + private var bundleName = "" + + constructor( + siteID: UUID, + isNetSite: Boolean, + siteName: String, + siteCipher: String, + siteHand: Avatar?, + isCallable: Boolean + ) { + siteMode = if (isNetSite) SiteMode.NET else SiteMode.FAVOR + avatarsCeiling = if (isNetSite) 8 else Int.MAX_VALUE + this.siteID = siteID + this.siteName = siteName + this.siteCipher = siteCipher + isEditable = true + this.siteHand = siteHand + this.isCallable = isCallable + isGetNotify = true + isEnterQuitAware = true + isEssential = false + hasAvatar = true + handler = ses.scheduleAtFixedRate({ + var wasModified = false + val millis = System.currentTimeMillis() + synchronized(avatarsCSX) { + lastAudioInputMillis.forEach { + val isAudioInput = it.value + 500 >= millis + if (isAudioInputs[it.key] != isAudioInput) { + isAudioInputs[it.key] = isAudioInput + wasModified = true + } + } + } + if (wasModified) { + doCallSiteAvatar(false) + } + }, 0L, (1000 / 60).toLong(), TimeUnit.MILLISECONDS) + } + + constructor( + siteID: UUID, + siteName: String, + isEditable: Boolean, + isGetNotify: Boolean, + isEssential: Boolean, + hasAvatar: Boolean + ) { + siteMode = SiteMode.DEFAULT + avatarsCeiling = Int.MAX_VALUE + this.siteID = siteID + this.siteName = siteName + siteCipher = "" + this.isEditable = isEditable + isCallable = true + this.isGetNotify = isGetNotify + isEnterQuitAware = false + this.isEssential = isEssential + this.hasAvatar = hasAvatar + handler = null + } + + fun onWipeSite() { + if (siteMode == SiteMode.NET) { + FileUtils.deleteQuietly(TwilightComponent.BUNDLE_ENTRY_PATH.resolve("$siteID.zip").toFile()) + } + handler?.cancel(false) + } + + fun isAvatarJoined(avatar: Avatar): Boolean { + return avatars.contains(avatar) + } + + private fun tryQuitNet() { + val netAvatars = avatars.filter { avatarConfigures[it.avatarID] == AvatarConfigure.NET } + if (netAvatars.all { netItems[it.avatarID]?.avatarNetStatus != EventClass.Event.AvatarNetStatus.Default }) { + netAvatars.forEach { + avatarConfigures[it.avatarID] = AvatarConfigure.DEFAULT + } + siteSituation = SiteSituation.DEFAULT + setNetBundle("") + if (isAutoSiteHand) { + setAutoSiteHand() + } + doCallSiteAvatar(false) + val netItemsHaveComment = netItems.entries.stream().filter { it.value.comment != null } + .collect( + Collectors.toMap({ it.key }, { it.value }) + ) + val validNetItems = setValidMap(netItemsHaveComment).toList() + + val text = object { + val handlerID = this@Site.handlerID + val quitNetItems = validNetItems.map { + object { + val avatarID = it.avatarID + val avatarName = it.avatarName + val title = it.title + val artist = it.artist + val genre = it.genre + val level = it.level + val levelText = it.levelText + val wantLevelID = it.wantLevelID + val autoMode = it.autoMode + val noteSaltMode = it.noteSaltMode + val audioMultiplier = it.audioMultiplier + val faintNoteMode = it.faintNoteMode + val hitPointsMode = it.hitPointsMode + val judgmentMode = it.judgmentMode + val noteMobilityMode = it.noteMobilityMode + val inputFavorMode = it.inputFavorMode + val longNoteMode = it.longNoteMode + val noteModifyMode = it.noteModifyMode + val bpmMode = it.bpmMode + val waveMode = it.waveMode + val setNoteMode = it.setNoteMode + val lowestJudgmentConditionMode = it.lowestJudgmentConditionMode + val totalNotes = it.totalNotes + val judgmentStage = it.judgmentStage + val hitPointsValue = it.hitPointsValue + val highestInputCount = it.highestInputCount + val length = it.length + val bpm = it.bpm + val multiplier = it.multiplier + val inputMode = it.inputMode.ordinal + val stand = it.stand + val highestBand = it.highestBand + val point = it.point + val hitPoints = it.hitPoints + val highestJudgment0 = it.highestJudgment0 + val higherJudgment0 = it.higherJudgment0 + val highJudgment0 = it.highJudgment0 + val lowJudgment0 = it.lowJudgment0 + val lowerJudgment0 = it.lowerJudgment0 + val lowestJudgment0 = it.lowestJudgment0 + val highestJudgment1 = it.highestJudgment1 + val higherJudgment1 = it.higherJudgment1 + val highJudgment1 = it.highJudgment1 + val lowJudgment1 = it.lowJudgment1 + val lowerJudgment1 = it.lowerJudgment1 + val lowestJudgment1 = it.lowestJudgment1 + + @JvmField + val isF = it.avatarNetStatus == EventClass.Event.AvatarNetStatus.Failed + + val netPosition = validNetItems.indexOf(it) + } + }.toList() + } + val comments = validNetItems.map { it.comment?.toByteString() }.toTypedArray() + netAvatars.forEach { + it.send( + EventClass.Event.EventID.QUIT_NET, text, *comments + ) + } + if (netItemsHaveComment.isNotEmpty()) { + netSIteCommentItems.add(NetSiteCommentItems(netItemsHaveComment, System.currentTimeMillis())) + } + } + } + + private fun setValidMap(netItems: Map): Stream { + fun getAvatarGroup(netItem: NetItem): String { + val avatarID = netItem.avatarID + val avatarGroup = avatarGroups[avatarID] ?: 0 + return if (avatarGroup > 0) "#${avatarGroup}" else avatarID + } + + fun getValue(netItem: NetItem): Double { + return when (validHunterMode) { + NetItem.STAND_MODE -> netItem.stand.toDouble() + NetItem.POINT_MODE -> netItem.point + NetItem.BAND_MODE -> netItem.highestBand.toDouble() + else -> 0.0 + } + } + + val avatarGroupValues = netItems.values.groupBy { getAvatarGroup(it) } + .map { + Pair(it.key, it.value.map { netItem -> + getValue(netItem) + }.average()) + }.toMap() + + fun getAvatarGroupValue(avatarGroup: String): Double { + return avatarGroupValues[avatarGroup] ?: 0.0 + } + + return netItems.values.stream().sorted { o1, o2 -> + val o1Failed = o1.avatarNetStatus == EventClass.Event.AvatarNetStatus.Failed + val o2Failed = o2.avatarNetStatus == EventClass.Event.AvatarNetStatus.Failed + if (o1Failed xor o2Failed) { + o1Failed.compareTo(o2Failed) + } else { + val avatarGroup1 = getAvatarGroup(o1) + val avatarGroup2 = getAvatarGroup(o2) + if (avatarGroup1 != avatarGroup2) { + getAvatarGroupValue(avatarGroup2).compareTo(getAvatarGroupValue(avatarGroup1)) + } else { + getValue(o2).compareTo(getValue(o1)) + } + } + } + } + + fun send(eventID: EventClass.Event.EventID, text: Any?, vararg data: ByteString) { + synchronized(avatarsCSX) { + avatars.forEach { + it.send( + eventID, text, *data + ) + } + } + } + + fun send(event: EventClass.Event) { + synchronized(avatarsCSX) { + avatars.forEach { + it.send(event) + } + } + } + + private fun sendSiteYell(twilightSiteYell: JSON.TwilightSiteYell) { + synchronized(avatarsCSX) { + avatars.forEach { + it.send( + EventClass.Event.EventID.SITE_YELL, twilightSiteYell + ) + } + } + PlatformSystem.sendSiteYell(twilightSiteYell) + } + + private fun sendTranslatedSiteYell(twilightSiteYell: JSON.TwilightSiteYell) { + synchronized(avatarsCSX) { + avatars.forEach { avatar -> + avatar.send( + EventClass.Event.EventID.SITE_YELL, twilightSiteYell + ) + Translator.translate(avatar.language, twilightSiteYell.siteYell, avatar).thenAccept { + avatar.send( + EventClass.Event.EventID.MODIFY_SITE_YELL, object { + val siteID = this@Site.siteID + val siteYellID = twilightSiteYell.siteYellID + val siteYell = it + }) + } + } + } + PlatformSystem.sendSiteYell(twilightSiteYell) + } + + private fun doCallSiteAvatar(setNoteFile: Boolean) { + if (hasAvatar) { + send(EventClass.Event.EventID.CALL_SITE_AVATAR, object { + val siteID = this@Site.siteID.toString() + val siteName = this@Site.siteName + val siteHand = this@Site.siteHand?.avatarID ?: "" + val situationValue = siteSituation.ordinal + val setNoteFile = setNoteFile + val data = synchronized(avatarsCSX) { + avatars.map { + object { + val avatarID = it.avatarID + val avatarConfigure = (avatarConfigures[it.avatarID] ?: AvatarConfigure.DEFAULT).value + val avatarName = it.avatarName + val avatarGroup = avatarGroups[it.avatarID] ?: -1 + + @JvmField + val isValve = it.isValve + + @JvmField + val isAudioInput = isAudioInputs[it.avatarID] ?: false + } + } + } + }) + } + } + + fun doCallSiteAvatar(avatar: Avatar?, avatars: List) { + val data = object { + val siteID = this@Site.siteID.toString() + val siteName = this@Site.siteName + val siteHand = "" + val situationValue = SiteSituation.DEFAULT.ordinal + val setNoteFile = false + val data = synchronized(avatarsCSX) { + avatars.map { + object { + val avatarID = "$${it.id}" + val avatarConfigure = AvatarConfigure.DEFAULT.value + val avatarName = it.effectiveName + + @JvmField + val isValve = false + + @JvmField + val isAudioInput = false + } + } + } + } + avatar?.send(EventClass.Event.EventID.CALL_SITE_AVATAR, data) + ?: send(EventClass.Event.EventID.CALL_SITE_AVATAR, data) + } + + private fun doCallSiteNet() { + send(EventClass.Event.EventID.CALL_SITE_NET, object { + val siteID = this@Site.siteID.toString() + val noteID = this@Site.noteID + val noteIDs = this@Site.noteIDs + val title = targetComputing.title + val artist = targetComputing.artist + val levelText = targetComputing.levelText + val level = targetComputing.level + val wantLevelID = targetComputing.wantLevelID + val genre = targetComputing.genre + val bpm = targetComputing.bpm + val lowestBPM = targetComputing.lowestBPM + val highestBPM = targetComputing.highestBPM + val judgmentStage = targetComputing.judgmentStage + val hitPointsValue = targetComputing.hitPointsValue + val totalNotes = targetComputing.totalNotes + val longNotes = targetComputing.longNotes + val autoableNotes = targetComputing.autoableNotes + val trapNotes = targetComputing.trapNotes + val highestInputCount = targetComputing.highestInputCount + val length = targetComputing.length + val inputMode = targetComputing.inputMode.ordinal + + @JvmField + val isAutoLongNote = targetComputing.isAutoLongNote + + @JvmField + val isFavorNoteFile = this@Site.isFavorNoteFile + + @JvmField + val isFavorModeComponent = this@Site.isFavorModeComponent + + @JvmField + val isFavorAudioMultiplier = this@Site.isFavorAudioMultiplier + + @JvmField + val isAutoSiteHand = this@Site.isAutoSiteHand + + val validHunterMode = this@Site.validHunterMode + val validNetMode = this@Site.validNetMode + val allowedPostableItems = this@Site.allowedPostableItems + val bundleEntryPath = this@Site.bundleEntryPath + val bundleName = this@Site.bundleName + }) + } + + private fun doCallSiteModeComponent() { + send(EventClass.Event.EventID.CALL_SITE_MODE_COMPONENT, object { + val siteID = this@Site.siteID.toString() + val modeComponentData = this@Site.modeComponentData + }) + } + + fun setLevying(avatar: Avatar) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && isAvatarJoined(avatar) && siteSituation == SiteSituation.DEFAULT) { + if (siteHand == avatar && validNetMode > 0 && allowedPostableItems.isEmpty()) { + send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("wrongAllowedPostableItems")) + } else { + val avatarID = avatar.avatarID + when (avatarConfigures[avatarID]) { + AvatarConfigure.LEVYING -> { + avatarConfigures.replace(avatarID, AvatarConfigure.DEFAULT) + doCallSiteAvatar(false) + } + + AvatarConfigure.DEFAULT -> { + avatarConfigures.replace(avatarID, AvatarConfigure.LEVYING) + doCallSiteAvatar(false) + } + + else -> Unit + } + if (siteHand == avatar) { + when (avatarConfigures[avatarID]) { + AvatarConfigure.LEVYING, AvatarConfigure.DEFAULT -> { + siteSituation = SiteSituation.COMPILING + handlerID = UUID.randomUUID().toString() + netItems.clear() + val avatarsCount = avatars.count { + avatarConfigures[it.avatarID] == AvatarConfigure.LEVYING + } + netItems.putAll(avatars.filter { + if (avatarConfigures.replace( + it.avatarID, AvatarConfigure.LEVYING, AvatarConfigure.COMPILING + ) + ) { + it.send(EventClass.Event.EventID.LEVY_NET, object { + val siteID = this@Site.siteID.toString() + val noteIDs = this@Site.noteIDs + val handlerID = this@Site.handlerID + + @JvmField + val isSiteHand = this@Site.siteHand == it + + @JvmField + val isFavorModeComponent = this@Site.isFavorModeComponent + + @JvmField + val isFavorAudioMultiplier = this@Site.isFavorAudioMultiplier + + val validHunterMode = this@Site.validHunterMode + val validNetMode = this@Site.validNetMode + val allowedPostableItems = this@Site.allowedPostableItems + + val modeComponentData = this@Site.modeComponentData + + val avatarsCount = avatarsCount + }) + true + } else { + false + } + }.map { + Pair(it.avatarID, NetItem(it.avatarID, it.avatarName)) + }) + doCallSiteAvatar(false) + } + + else -> Unit + } + } + } + } + } + } + + fun stopSiteNet(avatar: Avatar) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation != SiteSituation.DEFAULT) { + synchronized(avatarsCSX) { + avatars.filter { + val avatarConfigure = avatarConfigures[it.avatarID] + avatarConfigure == AvatarConfigure.COMPILING || avatarConfigure == AvatarConfigure.NET + }.forEach { + avatarConfigures[it.avatarID] = AvatarConfigure.DEFAULT + it.send( + EventClass.Event.EventID.QUIT_NET, object { + val handlerID = this@Site.handlerID + } + ) + } + } + siteSituation = SiteSituation.DEFAULT + doCallSiteAvatar(true) + } + } + } + + fun setCompiled(avatar: Avatar, isCompiled: Boolean, handlerID: String) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && isAvatarJoined(avatar) && this.handlerID == handlerID && siteSituation != SiteSituation.DEFAULT) { + val avatarID = avatar.avatarID + if (isCompiled) { + avatarConfigures.replace(avatarID, AvatarConfigure.COMPILING, AvatarConfigure.NET) + } else { + when (avatarConfigures[avatarID]) { + AvatarConfigure.COMPILING, AvatarConfigure.NET -> { + avatarConfigures[avatarID] = AvatarConfigure.DEFAULT + } + + else -> Unit + } + netItems[avatarID]?.avatarNetStatus = EventClass.Event.AvatarNetStatus.Failed + } + + when (siteSituation) { + SiteSituation.COMPILING -> { + if (avatars.all { + val avatarConfigure = avatarConfigures[it.avatarID] + avatarConfigure == AvatarConfigure.DEFAULT || avatarConfigure == AvatarConfigure.LEVYING + }) { + siteSituation = SiteSituation.DEFAULT + } else if (avatars.all { avatarConfigures[it.avatarID] != AvatarConfigure.COMPILING }) { + siteSituation = SiteSituation.NET + avatars.filter { avatarConfigures[it.avatarID] == AvatarConfigure.NET }.forEach { + it.send( + EventClass.Event.EventID.COMPILED, this.handlerID + ) + } + } + } + + SiteSituation.NET -> { + tryQuitNet() + } + + else -> Unit + } + + doCallSiteAvatar(false) + } + } + } + + fun setNetData( + avatar: Avatar, + qwilightCallNet: EventClass.Event.QwilightCallNet, + comment: CommentClass.Comment? + ) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && isAvatarJoined(avatar) && handlerID == qwilightCallNet.handlerID && siteSituation == SiteSituation.NET) { + val avatarID = avatar.avatarID + if (avatarConfigures[avatarID] == AvatarConfigure.NET) { + val targetNetItem = netItems[avatarID]!! + if (targetNetItem.avatarNetStatus == EventClass.Event.AvatarNetStatus.Default) { + targetNetItem.setValues(qwilightCallNet, comment) + val avatarNetStatus = qwilightCallNet.avatarNetStatus + targetNetItem.avatarNetStatus = avatarNetStatus + if (avatarNetStatus != EventClass.Event.AvatarNetStatus.Default) { + tryQuitNet() + } else { + val millis = System.currentTimeMillis() + if (millis - netDataMillis > 1000.0 / 60) { + netDataMillis = millis + netItems.values.forEach { it.setFailed() } + send(EventClass.Event.newBuilder().apply { + this.eventID = EventClass.Event.EventID.CALL_NET + this.twilightCallNet = EventClass.Event.TwilightCallNet.newBuilder().apply { + this.handlerID = this@Site.handlerID + var targetPosition = 0 + this.addAllData(setValidMap(netItems).map { + EventClass.Event.TwilightCallNet.CallNetItem.newBuilder().apply { + this.avatarNetStatus = it.avatarNetStatus + this.avatarID = it.avatarID + this.avatarName = it.avatarName + this.stand = it.stand + this.band = it.highestBand + this.point = it.point + this.hitPoints = it.hitPoints + this.isFailed = it.failed + this.lastJudged = it.lastJudged + this.addAllDrawings(it.drawings) + this.drawingComponent = it.drawingComponent + this.hitPointsMode = it.hitPointsMode + this.targetPosition = targetPosition++ + }.build() + }.toList()) + }.build() + }.build()) + } + } + } + } + } + } + } + + fun getCallingData(): Any? { + return if (isCallable) object { + val siteID = this@Site.siteID.toString() + val siteName = this@Site.siteName + val siteSituation = this@Site.siteSituation.ordinal + val siteConfigure = siteMode.ordinal + val hasCipher = siteCipher.isNotEmpty() + val avatarCount = (if (hasAvatar) avatars else PlatformSystem.platformAvatars).size + } else null + } + + fun isNetSiteHand(avatar: Avatar): Boolean { + return synchronized(avatarsCSX) { + siteMode == SiteMode.NET && avatar == siteHand + } + } + + fun quitAvatar(avatar: Avatar) { + synchronized(avatarsCSX) { + if (avatars.remove(avatar)) { + val avatarID = avatar.avatarID + lastAudioInputMillis.remove(avatarID) + isAudioInputs.remove(avatarID) + val avatarConfigure = avatarConfigures.remove(avatarID) + if (avatarConfigure == AvatarConfigure.NET || avatarConfigure == AvatarConfigure.COMPILING) { + netItems.remove(avatarID) + avatar.send(EventClass.Event.EventID.QUIT_NET, object { + val handlerID = this@Site.handlerID + }) + tryQuitNet() + } + avatarGroups.remove(avatarID) + if (siteHandQueue.remove(avatar)) { + if (siteHand == avatar) { + setAutoSiteHand() + } + } + avatar.send(EventClass.Event.EventID.QUIT_SITE, siteID.toString()) + if (isEnterQuitAware && avatar.isEnterQuitAware) { + putSiteYell("@Quit", avatarID, avatar.avatarName, System.currentTimeMillis()) + } + doCallSiteAvatar(true) + } + } + } + + val isVoid: Boolean + get() { + return !isEssential && synchronized(avatarsCSX) { + avatars.isEmpty() + } + } + + fun quitAvatars(): Boolean { + synchronized(avatarsCSX) { + avatars.toImmutableList().forEach { + quitAvatar(it) + } + } + return !isEssential + } + + fun enterSite(avatar: Avatar) { + synchronized(avatarsCSX) { + avatars.add(avatar) + val isNetSite = siteMode == SiteMode.NET + val avatarID = avatar.avatarID + avatarConfigures[avatarID] = AvatarConfigure.DEFAULT + avatarGroups[avatarID] = if (isNetSite) 0 else -1 + lastAudioInputMillis[avatarID] = Long.MIN_VALUE + isAudioInputs[avatarID] = false + siteHandQueue.offerFirst(avatar) + val data = synchronized(siteYells) { + siteYells.stream().skip(0.coerceAtLeast(siteYells.size - SITE_YELL_UNIT).toLong()).map { + val avatarName = it.avatarName + val isWiped = it.isWiped + object { + val avatarID = it.avatarID + val avatarName = if (isWiped) "@Wiped" else avatarName + val date = it.date + val siteYell = if (isWiped) avatarName else it.siteYell + val siteYellID = it.siteYellID + } + }.toList() + } + avatar.send(EventClass.Event.EventID.ENTER_SITE, object { + val siteID = this@Site.siteID.toString() + val siteNotify = this@Site.siteNotify + + @JvmField + val isNetSite = isNetSite + + @JvmField + val isGetNotify = this@Site.isGetNotify + + @JvmField + val isEditable = this@Site.isEditable + + @JvmField + val isAudioInput = siteMode != SiteMode.DEFAULT + + val data = data + val noteID = this@Site.noteID + val noteIDs = this@Site.noteIDs + val bundleEntryPath = this@Site.bundleEntryPath + val title = targetComputing.title + val artist = targetComputing.artist + val levelText = targetComputing.levelText + val level = targetComputing.level + val wantLevelID = targetComputing.wantLevelID + val genre = targetComputing.genre + val bpm = targetComputing.bpm + val lowestBPM = targetComputing.lowestBPM + val highestBPM = targetComputing.highestBPM + val judgmentStage = targetComputing.judgmentStage + val hitPointsValue = targetComputing.hitPointsValue + val totalNotes = targetComputing.totalNotes + val longNotes = targetComputing.longNotes + val autoableNotes = targetComputing.autoableNotes + val trapNotes = targetComputing.trapNotes + val highestInputCount = targetComputing.highestInputCount + val length = targetComputing.length + val inputMode = targetComputing.inputMode.ordinal + + @JvmField + val isAutoLongNote = targetComputing.isAutoLongNote + + @JvmField + val isFavorNoteFile = this@Site.isFavorNoteFile + + @JvmField + val isFavorModeComponent = this@Site.isFavorModeComponent + + @JvmField + val isFavorAudioMultiplier = this@Site.isFavorAudioMultiplier + + @JvmField + val isAutoSiteHand = this@Site.isAutoSiteHand + + val validHunterMode = this@Site.validHunterMode + val validNetMode = this@Site.validNetMode + val allowedPostableItems = this@Site.allowedPostableItems + val bundleName = this@Site.bundleName + val modeComponentData = this@Site.modeComponentData + }) + data.filter { + !it.avatarName.startsWith("@") + }.forEach { siteYell -> + Translator.translate(avatar.language, siteYell.siteYell, avatar).thenAccept { + avatar.send(EventClass.Event.EventID.MODIFY_SITE_YELL, object { + val siteID = this@Site.siteID + val siteYellID = siteYell.siteYellID + val siteYell = it + }) + } + } + if (isEnterQuitAware && avatar.isEnterQuitAware) { + putSiteYell("@Enter", avatarID, avatar.avatarName, System.currentTimeMillis()) + } + if (hasAvatar) { + doCallSiteAvatar(false) + } else { + doCallSiteAvatar(avatar, PlatformSystem.platformAvatars) + } + } + } + + fun exileAvatar(avatar: Avatar, toExileAvatar: Avatar): Boolean { + return synchronized(avatarsCSX) { + if (siteHand == avatar) { + if (toExileAvatar.isSU) { + avatar.send(EventClass.Event.EventID.NOTIFY_INFO, avatar.translateLanguage("failedExileCompetence")) + false + } else { + quitAvatar(toExileAvatar) + true + } + } else { + false + } + } + } + + fun setSiteHand(avatar: Avatar, siteHand: Avatar) { + synchronized(avatarsCSX) { + if (this.siteHand == avatar) { + avatarConfigures.replace(siteHand.avatarID, AvatarConfigure.LEVYING, AvatarConfigure.DEFAULT) + this.siteHand = siteHand + doCallSiteAvatar(true) + if (siteHandQueue.remove(siteHand)) { + siteHandQueue.offerLast(siteHand) + } + } + } + } + + private fun setAutoSiteHand() { + synchronized(avatarsCSX) { + siteHandQueue.peek()?.let { + avatarConfigures.replace(it.avatarID, AvatarConfigure.LEVYING, AvatarConfigure.DEFAULT) + siteHand = it + doCallSiteAvatar(true) + siteHandQueue.offerLast(it) + } + } + } + + fun setSiteName(avatar: Avatar, siteName: String) { + synchronized(avatarsCSX) { + if (siteHand == avatar) { + this.siteName = siteName + doCallSiteAvatar(false) + } + } + } + + fun enterSite(avatar: Avatar, siteCipher: String) { + if (isCallable) { + synchronized(avatarsCSX) { + if (!avatar.isSU && avatars.size >= avatarsCeiling) { + avatar.send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("siteHasNotSeat")) + } else if (isAvatarJoined(avatar)) { + avatar.send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("alreadyEnteredSite")) + } else { + if (avatar.isSU || this.siteCipher.isEmpty() || this.siteCipher == siteCipher) { + enterSite(avatar) + } else { + avatar.send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("wrongSiteCipher")) + } + } + } + } + } + + fun putSiteYell(siteID: UUID, siteName: String, avatarID: String, avatarName: String, millis: Long) { + val target = getTarget(avatarID) + sendSiteYell(JSON.TwilightSiteYell(SiteHandler.defaultSiteID.toString(), synchronized(siteYells) { + val siteYell = SiteYell(avatarID, "@Invite", millis, ObjectMapper().writeValueAsString(object { + val avatarName = avatarName + val siteID = siteID.toString() + val siteName = siteName + }), siteYells.size, -1) + putSiteYell(siteYell) + siteYell + }, target)) + } + + fun putSiteYell(tvItem: TVSystem.TVItem) { + val target = getTarget("") + val siteYell = synchronized(siteYells) { + val siteYell = SiteYell( + "", + "@TV", + System.currentTimeMillis(), + ObjectMapper().writeValueAsString(tvItem), + siteYells.size, + -1 + ) + putSiteYell(siteYell) + siteYell + } + sendSiteYell(JSON.TwilightSiteYell(SiteHandler.defaultSiteID.toString(), siteYell, target)) + DB.saveSiteYell(siteID.toString(), siteYell) + } + + fun putSiteYell(situation: String, avatarID: String, avatarName: String, millis: Long) { + val target = getTarget(avatarID) + val siteYell = synchronized(siteYells) { + val siteYell = SiteYell(avatarID, situation, millis, avatarName, siteYells.size, -1) + putSiteYell(siteYell) + siteYell + } + sendSiteYell(JSON.TwilightSiteYell(siteID.toString(), siteYell, target)) + if (isEssential) { + DB.saveSiteYell(siteID.toString(), siteYell) + } + } + + fun putSiteYell(avatar: Avatar, qwilightSiteYell: JSON.QwilightSiteYell) { + synchronized(avatarsCSX) { + if (isAvatarJoined(avatar)) { + if (isEditable) { + val avatarID = avatar.avatarID + val avatarName = avatar.avatarName + val millis = System.currentTimeMillis() + if (avatar.isMillisSuitable(millis)) { + if (qwilightSiteYell.target.isEmpty()) { + qwilightSiteYell.target = getTarget(avatarID) + } + val siteYell = synchronized(siteYells) { + val siteYell = + SiteYell( + avatarID, + avatarName, + millis, + qwilightSiteYell.siteYell, + siteYells.size, + -1 + ) + putSiteYell(siteYell) + siteYell + } + sendTranslatedSiteYell( + JSON.TwilightSiteYell( + siteID.toString(), + siteYell, + qwilightSiteYell.target + ) + ) + if (isEssential) { + DB.saveSiteYell(siteID.toString(), siteYell) + } + if (!avatar.isAwilight) { + logInfo("$avatarName ($avatarID): ${siteYell.siteYell}") + } + } else { + avatar.send( + EventClass.Event.EventID.SITE_YELL, JSON.TwilightSiteYell( + siteID.toString(), + SiteYell(avatarID, "", millis, avatar.translateLanguage("millisNotSuitable"), -1, -1), + "" + ) + ) + } + } + } + } + } + + fun putSiteYell(avatar: Member, event: MessageReceivedEvent) { + val avatarID = "$${avatar.id}" + PlatformSystem.putDrawing(avatarID, avatar.effectiveAvatarUrl).thenAccept { + if (event.message.contentDisplay.isNotEmpty()) { + val target = getTarget(avatarID) + val siteYell = synchronized(siteYells) { + val siteYell = + SiteYell( + avatarID, + avatar.effectiveName, + System.currentTimeMillis(), + event.message.contentDisplay, + siteYells.size, + event.messageIdLong + ) + putSiteYell(siteYell) + siteYell + } + sendTranslatedSiteYell(JSON.TwilightSiteYell(siteID.toString(), siteYell, target)) + if (isEssential) { + DB.saveSiteYell(siteID.toString(), siteYell) + } + } + + event.message.stickers.forEach { + val target = getTarget(avatarID) + val siteYell = synchronized(siteYells) { + val siteYell = + SiteYell( + avatarID, + avatar.effectiveName, + System.currentTimeMillis(), + it.iconUrl, + siteYells.size, + event.messageIdLong + ) + putSiteYell(siteYell) + siteYell + } + sendTranslatedSiteYell(JSON.TwilightSiteYell(siteID.toString(), siteYell, target)) + if (isEssential) { + DB.saveSiteYell(siteID.toString(), siteYell) + } + } + + event.message.attachments.forEach { + val target = getTarget(avatarID) + val siteYell = synchronized(siteYells) { + val siteYell = + SiteYell( + avatarID, + avatar.effectiveName, + System.currentTimeMillis(), + it.url, + siteYells.size, + event.messageIdLong + ) + putSiteYell(siteYell) + siteYell + } + sendTranslatedSiteYell(JSON.TwilightSiteYell(siteID.toString(), siteYell, target)) + if (isEssential) { + DB.saveSiteYell(siteID.toString(), siteYell) + } + } + } + } + + fun doModifySiteYell(avatar: Member, event: MessageUpdateEvent) { + PlatformSystem.putDrawing("$${avatar.id}", avatar.effectiveAvatarUrl).thenAccept { + synchronized(siteYells) { + platformSiteYells.computeIfPresent(event.messageIdLong) { _, platformSiteYell -> + platformSiteYell.forEach { + it.siteYell = event.message.contentDisplay + DB.doModifySiteYell(it) + send(EventClass.Event.EventID.MODIFY_SITE_YELL, object { + val siteID = SiteHandler.platformSiteID + val siteYellID = it.siteYellID + val siteYell = it.siteYell + }) + } + platformSiteYell + } + } + } + } + + fun wipeSiteYell(event: MessageDeleteEvent) { + synchronized(siteYells) { + platformSiteYells.computeIfPresent(event.messageIdLong) { _, platformSiteYell -> + platformSiteYell.forEach { + it.isWiped = true + DB.wipeSiteYell(it) + send(EventClass.Event.EventID.WIPE_SITE_YELL, object { + val siteID = SiteHandler.platformSiteID + val siteYellID = it.siteYellID + }) + } + null + } + } + } + + fun setNetBundle(bundleName: String) { + this.bundleName = bundleName + doCallSiteNet() + } + + fun getSiteYells(avatar: Avatar, qwilightGetSiteYells: JSON.QwilightGetSiteYells) { + synchronized(avatarsCSX) { + if (isAvatarJoined(avatar)) { + val siteYellID = qwilightGetSiteYells.siteYellID + + val data = synchronized(siteYells) { + siteYells.stream().skip( + 0.coerceAtLeast(siteYellID - SITE_YELL_UNIT).toLong() + ).limit(siteYellID.coerceAtMost(SITE_YELL_UNIT).toLong()).map { + val avatarName = it.avatarName + val isWiped = it.isWiped + object { + val avatarID = it.avatarID + val avatarName = if (isWiped) "@Wiped" else avatarName + val date = it.date + val siteYell = if (isWiped) avatarName else it.siteYell + val siteYellID = it.siteYellID + } + }.toList() + } + avatar.send(EventClass.Event.EventID.GET_SITE_YELLS, object { + val siteID = this@Site.siteID.toString() + val data = data + }) + data.filter { + !it.avatarName.startsWith("@") + }.forEach { siteYell -> + Translator.translate(avatar.language, siteYell.siteYell, avatar).thenAccept { + avatar.send(EventClass.Event.EventID.MODIFY_SITE_YELL, object { + val siteID = this@Site.siteID + val siteYellID = siteYell.siteYellID + val siteYell = it + }) + } + } + } + } + } + + private fun getTarget(avatarID: String): String { + synchronized(avatarsCSX) { + val avatars = avatars.filter { it.isAwilight && it.avatarID != avatarID } + return if (avatars.isEmpty()) { + "" + } else { + avatars[(Math.random() * avatars.size).toInt()].avatarID + } + } + } + + fun setSiteNotify(siteNotify: String) { + this.siteNotify = siteNotify + val siteYell = synchronized(siteYells) { + val siteYell = + SiteYell("", "@Notify", System.currentTimeMillis(), siteNotify, siteYells.size, -1) + putSiteYell(siteYell) + siteYell + } + sendTranslatedSiteYell(JSON.TwilightSiteYell(siteID.toString(), siteYell, "")) + if (isEssential) { + DB.saveSiteYell(siteID.toString(), siteYell) + } + } + + fun putSIteYell(twilightCommentSiteYell: JSON.TwilightCommentSiteYell) { + val siteYell = synchronized(siteYells) { + val siteYell = SiteYell( + twilightCommentSiteYell.avatarID, + "@Comment", + System.currentTimeMillis(), + ObjectMapper().writeValueAsString(twilightCommentSiteYell), + siteYells.size, + -1 + ) + putSiteYell(siteYell) + siteYell + } + sendSiteYell(JSON.TwilightSiteYell(siteID.toString(), siteYell, "")) + DB.saveSiteYell(siteID.toString(), siteYell) + } + + fun setModeComponent(avatar: Avatar, modeComponentData: Any) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation == SiteSituation.DEFAULT) { + setModeComponent(modeComponentData) + } + } + } + + fun setModeComponent(modeComponentData: Any) { + this.modeComponentData = modeComponentData + doCallSiteModeComponent() + } + + fun setFavorNoteFile(avatar: Avatar) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation == SiteSituation.DEFAULT) { + isFavorNoteFile = !isFavorNoteFile + doCallSiteNet() + doCallSiteAvatar(true) + } + } + } + + fun setFavorModeComponent(avatar: Avatar) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation == SiteSituation.DEFAULT) { + isFavorModeComponent = !isFavorModeComponent + doCallSiteNet() + doCallSiteModeComponent() + } + } + } + + fun setFavorAudioMultiplier(avatar: Avatar) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation == SiteSituation.DEFAULT) { + isFavorAudioMultiplier = !isFavorAudioMultiplier + if (isFavorAudioMultiplier) { + validNetMode = 0 + } + doCallSiteNet() + } + } + } + + fun setAvatarGroup(avatar: Avatar, qwilightSetAvatarGroup: JSON.QwilightSetAvatarGroup) { + val avatarGroup = qwilightSetAvatarGroup.avatarGroup + if (avatarGroup in 0..4) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteSituation == SiteSituation.DEFAULT) { + avatarGroups[avatar.avatarID] = qwilightSetAvatarGroup.avatarGroup + doCallSiteAvatar(false) + } + } + } + } + + fun setAutoSiteHand(avatar: Avatar) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar) { + isAutoSiteHand = !isAutoSiteHand + doCallSiteNet() + } + } + } + + fun setValidHunterMode(avatar: Avatar) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation == SiteSituation.DEFAULT) { + validHunterMode = (validHunterMode + 1) % 3 + doCallSiteNet() + } + } + } + + fun setValidNetMode(avatar: Avatar, qwilightSetValidNetMode: JSON.QwilightSetValidNetMode) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation == SiteSituation.DEFAULT) { + validNetMode = qwilightSetValidNetMode.validNetMode + if (validNetMode > 0) { + isFavorAudioMultiplier = false + } + doCallSiteNet() + } + } + } + + fun setAllowedPostableItems(allowedPostableItems: Array) { + this.allowedPostableItems = allowedPostableItems + doCallSiteNet() + } + + fun setAllowedPostableItems(avatar: Avatar, qwilightSetAllowedPostableItems: JSON.QwilightSetAllowedPostableItems) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation == SiteSituation.DEFAULT) { + setAllowedPostableItems(qwilightSetAllowedPostableItems.allowedPostableItems) + } + } + } + + fun doCallNetSiteComments(avatar: Avatar) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && isAvatarJoined(avatar)) { + if (netSIteCommentItems.isEmpty()) { + avatar.send( + EventClass.Event.EventID.WARNING, + avatar.translateLanguage("netSiteCommentNotAvailable") + ) + } else { + avatar.send( + EventClass.Event.EventID.CALL_NET_SITE_COMMENTS, netSIteCommentItems.stream().map { + object { + val date = it.date + val data = setValidMap(it.netItems).map { netItem -> + object { + val avatarNetStatus = netItem.avatarNetStatus.number + val avatarID = netItem.avatarID + val avatarName = netItem.avatarName + val stand = netItem.stand + val band = netItem.highestBand + val point = netItem.point + val highestJudgment = netItem.comment?.highestJudgment ?: 0 + val higherJudgment = netItem.comment?.higherJudgment ?: 0 + val highJudgment = netItem.comment?.highJudgment ?: 0 + val lowJudgment = netItem.comment?.lowJudgment ?: 0 + val lowerJudgment = netItem.comment?.lowerJudgment ?: 0 + val lowestJudgment = netItem.comment?.lowestJudgment ?: 0 + } + }.toArray() + } + }.toArray() + ) + } + } + } + } + + fun setNoteFileContents(avatar: Avatar, noteFileContents: JSON.QwilightSetNoteFile) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && siteHand == avatar && siteSituation == SiteSituation.DEFAULT) { + if (Arrays.compare(noteFileContents.noteIDs, noteIDs) != 0) { + synchronized(avatarsCSX) { + avatars.forEach { + avatarConfigures[it.avatarID] = AvatarConfigure.DEFAULT + } + } + doCallSiteAvatar(false) + } + setNoteFileContents(noteFileContents) + } + } + } + + fun setNoteFileContents(noteFileContents: JSON.QwilightSetNoteFile) { + noteID = noteFileContents.noteID + noteIDs = noteFileContents.noteIDs + bundleEntryPath = noteFileContents.bundleEntryPath + targetComputing.title = noteFileContents.title + targetComputing.artist = noteFileContents.artist + targetComputing.genre = noteFileContents.genre + targetComputing.levelText = noteFileContents.levelText + targetComputing.level = noteFileContents.level + targetComputing.wantLevelID = noteFileContents.wantLevelID + targetComputing.bpm = noteFileContents.bpm + targetComputing.lowestBPM = noteFileContents.lowestBPM + targetComputing.highestBPM = noteFileContents.highestBPM + targetComputing.judgmentStage = noteFileContents.judgmentStage + targetComputing.hitPointsValue = noteFileContents.hitPointsValue + targetComputing.totalNotes = noteFileContents.totalNotes + targetComputing.longNotes = noteFileContents.longNotes + targetComputing.autoableNotes = noteFileContents.autoableNotes + targetComputing.trapNotes = noteFileContents.trapNotes + targetComputing.highestInputCount = noteFileContents.highestInputCount + targetComputing.length = noteFileContents.length + targetComputing.isAutoLongNote = noteFileContents.isAutoLongNote + targetComputing.inputMode = noteFileContents.inputMode + doCallSiteNet() + } + + fun setSiteYells(siteYells: Collection) { + synchronized(siteYells) { + siteYells.forEach { + putSiteYell(it) + } + } + } + + private fun putSiteYell(siteYell: SiteYell) { + this.siteYells.add(siteYell) + val platformID = siteYell.platformID + if (platformID != -1L) { + platformSiteYells.computeIfAbsent(platformID) { + mutableListOf() + }.add(siteYell) + } + } + + fun silentSite() { + synchronized(siteYells) { + siteYells.clear() + } + } + + fun audioInput(avatar: Avatar, data: ByteString) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && isAvatarJoined(avatar)) { + val avatarID = avatar.avatarID + val event = EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.AUDIO_INPUT + twilightAudioInput = EventClass.Event.TwilightAudioInput.newBuilder().apply { + siteID = this@Site.siteID.toString() + this.avatarID = avatarID + }.build() + addData(data) + }.build() + avatars.filter { it.avatarID != avatarID }.forEach { + it.send(event) + } + lastAudioInputMillis[avatarID] = System.currentTimeMillis() + } + } + } + + fun postItem(avatar: Avatar, qwilightPostItem: EventClass.Event.QwilightPostItem) { + synchronized(avatarsCSX) { + if (siteMode == SiteMode.NET && isAvatarJoined(avatar) && handlerID == qwilightPostItem.handlerID && siteSituation == SiteSituation.NET && netItems[avatar.avatarID]?.avatarNetStatus == EventClass.Event.AvatarNetStatus.Default) { + val avatarGroup = avatarGroups[avatar.avatarID] + avatars.filter { + val isPositive = qwilightPostItem.isPositive + if (isPositive == -1) { + true + } else { + if (avatar == it) { + isPositive > 0 + } else { + (isPositive > 0) xor (avatarGroups[it.avatarID] == 0 || avatarGroups[it.avatarID] != avatarGroup) + } + } + }.forEach { + it.send(EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.POST_ITEM + twilightPostItem = EventClass.Event.TwilightPostItem.newBuilder().apply { + handlerID = this@Site.handlerID + avatarName = avatar.avatarName + postedItem = qwilightPostItem.postedItem + wait = Utility.getSaltedItem(qwilightPostItem.lowestWait, qwilightPostItem.highestWait) + }.build() + }.build()) + } + } + } + } + + override fun toString(): String { + return when (siteSituation) { + SiteSituation.DEFAULT -> "[$siteID] $siteName [${avatars.size}] Idle" + SiteSituation.COMPILING -> "[$siteID] $siteName [${avatars.size}] Compiling Note File" + SiteSituation.NET -> "[$siteID] $siteName [${avatars.size}] Net Computing" + } + } + + override fun logInfo(toNotify: String) { + LoggerFactory.getLogger(javaClass).info("[{}] {}", siteName, toNotify) + } + + override fun logFault(e: Throwable) { + LoggerFactory.getLogger(javaClass).error("[{}] {}", siteName, Utility.getFault(e)) + } + + companion object { + const val SITE_YELL_UNIT = 16 + + private val ses: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor { + Executors.defaultThreadFactory().newThread(it).apply { + isDaemon = true + } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/SiteYell.kt b/src/main/kotlin/net/taehui/twilight/SiteYell.kt new file mode 100644 index 0000000..db17be4 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/SiteYell.kt @@ -0,0 +1,12 @@ +package net.taehui.twilight + +class SiteYell( + val avatarID: String, + val avatarName: String, + val date: Long, + var siteYell: String, + val siteYellID: Int, + val platformID: Long +) { + var isWiped = false +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/Twilight.kt b/src/main/kotlin/net/taehui/twilight/Twilight.kt new file mode 100644 index 0000000..2f80b8a --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/Twilight.kt @@ -0,0 +1,104 @@ +package net.taehui.twilight + +import io.netty.channel.epoll.EpollEventLoopGroup +import io.netty.channel.epoll.EpollServerSocketChannel +import io.netty.channel.nio.NioEventLoopGroup +import io.netty.channel.socket.ServerSocketChannel +import io.netty.channel.socket.nio.NioServerSocketChannel +import net.taehui.twilight.qwilight.QwilightBoot +import net.taehui.twilight.site.SiteBoot +import net.taehui.twilight.system.* +import net.taehui.twilight.taehui.TaehuiBoot +import net.taehui.twilight.www.WwwBoot +import org.apache.commons.cli.DefaultParser +import org.apache.commons.cli.Option +import org.apache.commons.cli.Options +import org.apache.commons.lang3.SystemUtils +import org.fusesource.jansi.AnsiConsole +import java.io.IOException +import java.nio.file.Files +import java.nio.file.Paths +import java.security.KeyStore +import javax.net.ssl.KeyManagerFactory +import javax.net.ssl.SSLContext +import kotlin.io.path.absolute + +object Twilight { + @JvmStatic + fun main(args: Array) { + try { + Files.createDirectories(TwilightComponent.NOTE_ENTRY_PATH) + Files.createDirectories(TwilightComponent.COMMENT_ENTRY_PATH) + Files.createDirectories(TwilightComponent.BUNDLE_ENTRY_PATH) + Files.createDirectories(TwilightComponent.DEFAULT_NOTE_ENTRY) + Files.createDirectories(TwilightComponent.DEFAULT_UI_ENTRY) + Files.createDirectories(TwilightComponent.TITLE_ENTRY_PATH) + Files.createDirectories(TwilightComponent.LEVEL_ENTRY_PATH) + Files.createDirectories(TwilightComponent.VOTE_ENTRY_PATH) + Files.createDirectories(TwilightComponent.ABILITY_ENTRY_PATH) + Files.createDirectories(TwilightComponent.EDGE_ENTRY_PATH) + } catch (e: IOException) { + System.err.println("Cannot run Twilight from ${Paths.get("").absolute()}") + Runtime.getRuntime().exit(1) + } + + val o = Options() + o.addOption(Option("t", "test", false, "Test")) + val isTest = DefaultParser().parse(o, args).hasOption("test") + + val eventLoopGroup = if (SystemUtils.IS_OS_LINUX) EpollEventLoopGroup() else NioEventLoopGroup() + val eventChannel: Class = + if (SystemUtils.IS_OS_LINUX) EpollServerSocketChannel::class.java else NioServerSocketChannel::class.java + try { + AnsiConsole.systemInstall() + Configure.loadConfigure() + DB.loadDB(isTest) + AbilityClassSystem.loadAbilityClasses() + AbilitySystem.loadAbility() + BannedIP.loadBannedIP() + BannedNote.loadBannedNote() + EdgeSystem.loadEdge() + History.loadHistory() + LevelSystem.loadLevel() + TitleSystem.loadTitle() + VoteSystem.loadVote() + AutoSystem.handleSystem() + Files.newInputStream(Paths.get("Twilight.jks")).use { + val keyStore = KeyStore.getInstance(KeyStore.getDefaultType()) + keyStore.load(it, Configure.javaCipherStore.pw0) + val keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()) + keyManagerFactory.init(keyStore, Configure.javaCipherStore.pw1) + val sslContext = SSLContext.getInstance("TLS") + sslContext.init(keyManagerFactory.keyManagers, null, null) + QwilightBoot(eventLoopGroup, eventChannel, sslContext).run() + SiteBoot(eventLoopGroup, eventChannel).run() + WwwBoot(eventLoopGroup, eventChannel).run() + TaehuiBoot(eventLoopGroup, eventChannel).run() + } + TVSystem.handleSystem() + NoteFilesSystem.loadNoteFiles() + PlatformIDSystem.loadPlatformID() + PlatformSystem.handleSystem() + WitSystem.handleSystem() + QwilightNamesSystem.loadQwilightNames() + AwilightHandler.eventLoopGroup = eventLoopGroup + AwilightHandler.setAwilightCount(Configure.awilightCount) + if (isTest) { + AvatarHandler.sendClose("") + } else { + AvatarHandler.sendClose(IO.handleSystem()) + } + } finally { + WitSystem.dispose() + PlatformIDSystem.savePlatformID() + PlatformSystem.dispose() + TVSystem.dispose() + AutoSystem.dispose() + History.saveHistory() + BannedIP.saveBannedIP() + BannedNote.saveBannedNote() + Configure.saveConfigure() + eventLoopGroup.shutdownGracefully() + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/TwilightComponent.kt b/src/main/kotlin/net/taehui/twilight/TwilightComponent.kt new file mode 100644 index 0000000..e67655a --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/TwilightComponent.kt @@ -0,0 +1,17 @@ +package net.taehui.twilight + +import java.nio.file.Path +import java.nio.file.Paths + +object TwilightComponent { + val NOTE_ENTRY_PATH: Path = Paths.get("Note") + val COMMENT_ENTRY_PATH: Path = Paths.get("Comment") + val BUNDLE_ENTRY_PATH: Path = Paths.get("Bundle") + val DEFAULT_NOTE_ENTRY: Path = Paths.get("Default").resolve("Note") + val DEFAULT_UI_ENTRY: Path = Paths.get("Default").resolve("UI") + val TITLE_ENTRY_PATH: Path = Paths.get("Title") + val LEVEL_ENTRY_PATH: Path = Paths.get("Level") + val VOTE_ENTRY_PATH: Path = Paths.get("Vote") + val ABILITY_ENTRY_PATH: Path = Paths.get("Ability") + val EDGE_ENTRY_PATH: Path = Paths.get("Edge") +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/Utility.kt b/src/main/kotlin/net/taehui/twilight/Utility.kt new file mode 100644 index 0000000..aab16cd --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/Utility.kt @@ -0,0 +1,89 @@ +package net.taehui.twilight + +import io.netty.handler.codec.DecoderException +import io.netty.handler.ssl.NotSslRecordException +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.system.PlatformIDSystem +import java.net.MalformedURLException +import java.net.SocketException +import java.net.URI +import java.net.URL +import java.util.* + +object Utility { + fun isEtcNetBundle(etc: String): Boolean { + return etc.isNotEmpty() && "Qwilight" != etc && "MD5" != etc && !etc.contains(":") + } + + fun getDistance( + value: Component, + waitBPMMap: Queue>, + loopingCounter: Double, + targetLoopingCounter: Double + ): Double { + var tmpLoopingCounter = loopingCounter + var distance = 0.0 + while (!waitBPMMap.isEmpty()) { + val (wait, bpm) = waitBPMMap.peek() + if (wait < targetLoopingCounter) { + distance += value.logicalYMillis * (wait - tmpLoopingCounter) + tmpLoopingCounter = wait + value.setBPM(bpm) + waitBPMMap.poll() + } else { + break + } + } + return distance + value.logicalYMillis * (targetLoopingCounter - tmpLoopingCounter) + } + + fun getDefaultAvatarID(avatarID: String): String { + return PlatformIDSystem.getAvatarID(avatarID.substring(avatarID.indexOf("@") + 1)) + } + + fun getFault(e: Throwable): String { + return StringBuilder(e.localizedMessage ?: "").apply { + e.stackTrace.forEach { + append(System.lineSeparator()) + append(it) + } + }.toString() + } + + fun getSaltedItem(toSaltItems: List, defaultValue: T): T { + return if (toSaltItems.isEmpty()) defaultValue else toSaltItems[(Math.random() * toSaltItems.size).toInt()] + } + + fun getSaltedItem(lowestWait: Double, highestWait: Double): Double { + return lowestWait + Math.random() * (highestWait - lowestWait) + } + + fun getQuitStatusValue(point: Double, stand: Int): Int { + if (point < 0.8) { + return 6 + } + if (point < 0.85) { + return 5 + } + if (point < 0.9) { + return 4 + } + if (point < 0.95) { + return 3 + } + return if (stand < 900000) 2 else if (point < 1.0) 1 else 0 + } + + fun isValidWww(www: String): Boolean { + return try { + URL(www) + true + } catch (e: MalformedURLException) { + false + } + } + + fun isValidFault(e: Throwable): Boolean { + return !(e is SocketException && e.localizedMessage?.contains("Connection reset") == true) && !(e is DecoderException && e.cause is NotSslRecordException) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/awilight/AwilightAvatar.kt b/src/main/kotlin/net/taehui/twilight/awilight/AwilightAvatar.kt new file mode 100644 index 0000000..f3e5aa9 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/awilight/AwilightAvatar.kt @@ -0,0 +1,566 @@ +package net.taehui.twilight.awilight + +import com.fasterxml.jackson.databind.ObjectMapper +import com.google.protobuf.ByteString +import io.netty.channel.ChannelHandlerContext +import io.netty.channel.SimpleChannelInboundHandler +import net.taehui.EventClass +import net.taehui.twilight.BaseCompiler +import net.taehui.twilight.JSON +import net.taehui.twilight.Logger +import net.taehui.twilight.Utility +import net.taehui.twilight.system.* +import org.apache.hc.client5.http.classic.methods.HttpGet +import org.apache.hc.client5.http.impl.classic.BasicHttpClientResponseHandler +import org.apache.hc.client5.http.impl.classic.HttpClients +import org.python.core.Py +import org.python.core.PyFunction +import org.python.core.PyObject +import org.python.util.PythonInterpreter +import org.slf4j.LoggerFactory +import java.nio.file.Files +import java.time.LocalDateTime +import java.util.* + +class AwilightAvatar : SimpleChannelInboundHandler(), Logger { + private lateinit var handler: ChannelHandlerContext + private val enteredSites = mutableMapOf() + private val defaultComputerCSX = Any() + private val w = Math.random().coerceIn(0.3, 0.7) + private val awilightCaller = PythonInterpreter() + val qwilightName = QwilightNamesSystem.qwilightName + var defaultComputer: DefaultCompute? = null + var avatarID = "" + + init { + loadAwilight() + } + + val isBeginner: Boolean + get() { + return w < 0.4 + } + + fun loadAwilight() { + awilightCaller.cleanup() + awilightCaller["awilight"] = this + awilightCaller.execfile("Awilight.py") + } + + fun dispose() { + WitSystem.wipeWit(this) + synchronized(defaultComputerCSX) { + defaultComputer?.stop() + } + } + + private fun on(function: String, params: Array) { + awilightCaller.get(function, PyFunction::class.java)?.__call__(params) + } + + fun send(eventID: EventClass.Event.EventID, text: Any?, vararg data: ByteString) { + handler.writeAndFlush(EventClass.Event.newBuilder().apply { + this.millis = System.currentTimeMillis() + this.avatarID = this@AwilightAvatar.avatarID + this.eventID = eventID + if (text != null) { + this.text = if (text is String) text else ObjectMapper().writeValueAsString(text) + } + this.addAllData(data.toList()) + }.build()) + } + + fun send(event: EventClass.Event.Builder) { + event.millis = System.currentTimeMillis() + event.avatarID = avatarID + handler.writeAndFlush(event.build()) + } + + fun yell(siteID: String, siteYell: String) { + send(EventClass.Event.EventID.SITE_YELL, object { + val siteID = siteID + val siteYell = siteYell + }) + } + + fun setSiteHand(siteID: String, avatarID: String) { + synchronized(enteredSites) { + enteredSites[siteID]?.let { + if (it.isSiteHand) { + send(EventClass.Event.EventID.SET_SITE_HAND, object { + val siteID = siteID + val avatarID = avatarID + }) + } + } + } + } + + + fun stopSiteNet(siteID: String) { + synchronized(enteredSites) { + enteredSites[siteID]?.let { + if (it.isSiteHand) { + send(EventClass.Event.EventID.QUIT_NET, siteID) + } + } + } + } + + + fun handleSiteNet(siteID: String) { + synchronized(enteredSites) { + enteredSites[siteID]?.let { + if (it.isSiteHand && it.avatarConfigure == AwilightSite.AVATAR_CONFIGURE_DEFAULT) { + send(EventClass.Event.EventID.LEVY_NET, siteID) + } + } + } + } + + fun quitSite(siteID: String) { + send(EventClass.Event.EventID.QUIT_SITE, siteID) + } + + fun setNoteFile(siteID: String) { + synchronized(enteredSites) { + enteredSites[siteID]?.let { + if (it.isSiteHand) { + NoteFilesSystem.noteFile?.let { (noteID, noteFilePath) -> + val targetComputing = BaseCompiler.handleCompile(Files.readAllBytes(noteFilePath)) + send( + EventClass.Event.EventID.SET_NOTE_FILE, + object { + val siteID = siteID + val noteID = noteID + val noteIDs = arrayOf(noteID) + val title = targetComputing.title + val artist = targetComputing.artist + val genre = targetComputing.genre + val levelText = targetComputing.levelText + val level = targetComputing.level + val wantLevelID = targetComputing.wantLevelID + val judgmentStage = targetComputing.judgmentStage + val hitPointsValue = targetComputing.hitPointsValue + val totalNotes = targetComputing.totalNotes + val longNotes = targetComputing.longNotes + val autoableNotes = targetComputing.autoableNotes + val trapNotes = targetComputing.trapNotes + val highestInputCount = targetComputing.highestInputCount + val length = targetComputing.length + val bpm = targetComputing.bpm + val lowestBPM = targetComputing.lowestBPM + val highestBPM = targetComputing.highestBPM + val inputMode = targetComputing.inputMode.ordinal + } + ) + send( + EventClass.Event.EventID.SET_SITE_NAME, + object { + val siteID = siteID + val siteName = targetComputing.title + } + ) + } + } + } + } + } + + override fun logInfo(toNotify: String) { + LoggerFactory.getLogger(javaClass).info("[{}] {}", this.qwilightName, toNotify) + } + + override fun logFault(e: Throwable) { + LoggerFactory.getLogger(javaClass).error("[{}] {}", this.qwilightName, Utility.getFault(e)) + } + + override fun channelActive(ctx: ChannelHandlerContext) { + handler = ctx + AwilightHandler.putAvatar(ctx, this) + } + + override fun channelInactive(ctx: ChannelHandlerContext) { + AwilightHandler.quitAvatar(ctx) + } + + public override fun channelRead0(ctx: ChannelHandlerContext, msg: EventClass.Event) { + val eventText = msg.text + val jm = ObjectMapper() + when (msg.eventID) { + EventClass.Event.EventID.ESTABLISH -> { + val text = jm.readValue(eventText, JSON.TwilightEstablish::class.java) + this.avatarID = text.avatarID + on("onEstablished", emptyArray()) + send( + EventClass.Event.EventID.ENTER_SITE, + object { + val siteID = "00000000-0000-0000-0000-000000000000" + val siteCipher = "" + } + ) + send( + EventClass.Event.EventID.ENTER_SITE, + object { + val siteID = "00000000-0000-0000-0000-000000000001" + val siteCipher = "" + } + ) + WitSystem.handleLoop(this, LocalDateTime.now(), -1) { + synchronized(enteredSites) { + val sites = enteredSites.values.filter { it.isNetSite } + if (sites.isNotEmpty()) { + sites.stream() + .filter { it.siteSituation == AwilightSite.SITE_SITUATION_DEFAULT } + .findAny().ifPresent { + if (Arrays.stream(it.noteIDs) + .anyMatch { noteID -> NoteFilesSystem.hasNoteFile(noteID) } + ) { + if (it.isNetAllowed) { + send(EventClass.Event.EventID.LEVY_NET, it.siteID) + } + } else { + setNoteFile(it.siteID) + } + } + } else { + logValueFuture { + HttpClients.createDefault().use { + val dataGet = HttpGet(Configure.www.qwilight + "/sites") + val siteIDs = + ObjectMapper().readValue( + it.execute( + dataGet, + BasicHttpClientResponseHandler() + ), Array::class.java + ) + .filter { siteData -> !siteData.hasCipher && siteData.siteConfigure == 2 && siteData.avatarCount < 7 } + .map { siteData -> siteData.siteID } + if (siteIDs.isNotEmpty()) { + send( + EventClass.Event.EventID.ENTER_SITE, + object { + val siteID = Utility.getSaltedItem(siteIDs, null) + val siteCipher = "" + } + ) + } else { + NoteFilesSystem.noteFile?.let { (noteID, noteFilePath) -> + val targetComputing = BaseCompiler.handleCompile( + Files.readAllBytes( + noteFilePath + ) + ) + targetComputing.noteID = noteID + val modeComponentValue = ModeComponent() + send( + EventClass.Event.EventID.NEW_SITE, + object { + val siteName = targetComputing.title + val siteCipher = "" + + @JvmField + val isNetSite = true + val data = object { + val salt = modeComponentValue.salt + val valueMultiplier = modeComponentValue.multiplierValue + val autoMode = modeComponentValue.autoMode + val noteSaltMode = modeComponentValue.noteSaltMode + val faintNoteMode = modeComponentValue.faintNoteMode + val judgmentMode = modeComponentValue.judgmentMode + val hitPointsMode = modeComponentValue.hitPointsMode + val noteMobilityMode = modeComponentValue.noteMobilityMode + val longNoteMode = modeComponentValue.longNoteMode + val inputFavorMode = modeComponentValue.inputFavorMode + val noteModifyMode = modeComponentValue.noteModifyMode + val bpmMode = modeComponentValue.bpmMode + val waveMode = modeComponentValue.waveMode + val setNoteMode = modeComponentValue.setNoteMode + val lowestJudgmentConditionMode = + modeComponentValue.lowestJudgmentConditionMode + val audioMultiplier = modeComponentValue.audioMultiplier + val highestJudgment0 = -1.0 + val higherJudgment0 = -1.0 + val highJudgment0 = -1.0 + val lowJudgment0 = -1.0 + val lowerJudgment0 = -1.0 + val lowestJudgment0 = -1.0 + val highestJudgment1 = 1.0 + val higherJudgment1 = 1.0 + val highJudgment1 = 1.0 + val lowJudgment1 = 1.0 + val lowerJudgment1 = 1.0 + val lowestJudgment1 = 1.0 + val lowestLongNoteModify = 100.0 + val highestLongNoteModify = 100.0 + val putNoteSet = 25.0 + val putNoteSetMillis = 100.0 + } + val noteID = targetComputing.noteID + val noteIDs = arrayOf(targetComputing.noteID) + val title = targetComputing.title + val artist = targetComputing.artist + val genre = targetComputing.genre + val levelText = targetComputing.levelText + val level = targetComputing.level + val wantLevelID = targetComputing.wantLevelID + val judgmentStage = targetComputing.judgmentStage + val hitPointsValue = targetComputing.hitPointsValue + val totalNotes = targetComputing.totalNotes + val longNotes = targetComputing.longNotes + val autoableNotes = targetComputing.autoableNotes + val trapNotes = targetComputing.trapNotes + val highestInputCount = targetComputing.highestInputCount + val length = targetComputing.length + val bpm = targetComputing.bpm + val inputMode = targetComputing.inputMode.ordinal + + @JvmField + val isAutoLongNote = targetComputing.isAutoLongNote + val bundleEntryPath = "" + } + ) + } + } + } + } + } + } + } + } + + EventClass.Event.EventID.ENTER_SITE -> { + val text = jm.readValue(eventText, JSON.TwilightEnterSite::class.java) + synchronized(enteredSites) { + enteredSites.put( + text.siteID, + AwilightSite( + text.siteID, + text.isNetSite, + text.noteID, + text.noteIDs + ) + ) + } + } + + EventClass.Event.EventID.QUIT_SITE -> { + synchronized(enteredSites) { enteredSites.remove(eventText) } + } + + EventClass.Event.EventID.LEVY_NET -> { + val text = jm.readValue(eventText, JSON.TwilightLevyNet::class.java) + synchronized(enteredSites) { + enteredSites[text.siteID]?.let { + synchronized(defaultComputerCSX) { + defaultComputer?.stop() + defaultComputer = DefaultCompute(this, text.handlerID, it).also { tmpComputer -> + tmpComputer.noteID = + if (NoteFilesSystem.hasNoteFile(it.noteID)) { + it.noteID + } else { + Arrays.stream(text.noteIDs) + .filter { + NoteFilesSystem.hasNoteFile( + it + ) + }.findAny().orElse(null) + } + Thread { + var isOK = false + try { + if (tmpComputer.noteID.isNotEmpty()) { + NoteFilesSystem.getNoteFile(tmpComputer.noteID)?.let { + tmpComputer.handleCompile(it) + isOK = true + } + } + } finally { + if (!isOK) { + tmpComputer.stop() + setNoteFile(it.siteID) + } + } + }.apply { isDaemon = true }.start() + } + } + } + } + } + + EventClass.Event.EventID.COMPILED -> { + synchronized(defaultComputerCSX) { + if (eventText == defaultComputer?.handlerID) { + Thread { + try { + defaultComputer?.handleNotes(w) + } finally { + defaultComputer?.stop() + } + }.apply { isDaemon = true }.start() + } + } + } + + EventClass.Event.EventID.QUIT_NET -> { + val text = jm.readValue(eventText, JSON.TwilightQuitNet::class.java) + synchronized(defaultComputerCSX) { + defaultComputer?.let { tmpComputer -> + if (tmpComputer.handlerID == text.handlerID) { + tmpComputer.stop() + text.quitNetItems?.let { + on( + "onHandled", arrayOf( + Py.newBoolean( + tmpComputer.isF + ), + Py.newUnicode(tmpComputer.title), + Py.newInteger(tmpComputer.targetStand) + ) + ) + } + setNoteFile(tmpComputer.site.siteID) + } + } + } + } + + EventClass.Event.EventID.CALL_SITE_AVATAR -> { + val text = jm.readValue( + eventText, + JSON.TwilightCallSiteAvatar::class.java + ) + synchronized(enteredSites) { + enteredSites[text.siteID]?.let { site -> + Arrays.stream(text.data) + .filter { it.avatarID == avatarID } + .findAny().ifPresent { + site.setAvatarConfigure( + avatarID == text.siteHand, + it.avatarConfigure + ) + } + site.setSIteSituation(text.situationValue) + site.setNetAllowed(text.data, avatarID) + } + } + } + + EventClass.Event.EventID.CALL_SITE_NET -> { + val text = jm.readValue(eventText, JSON.TwilightCallSiteNet::class.java) + synchronized(enteredSites) { + enteredSites[text.siteID]?.setSiteNetData(text) + } + } + + EventClass.Event.EventID.SITE_YELL -> { + val text = jm.readValue(eventText, JSON.TwilightSiteYell::class.java) + on( + "onSiteYell", arrayOf( + Py.newBoolean( + avatarID == text.target + ), + Py.newUnicode(text.siteID), + Py.newUnicode(text.avatarID), + Py.newUnicode(text.avatarName), + Py.newUnicode(text.siteYell) + ) + ) + } + + EventClass.Event.EventID.CALL_IO -> { + val text = jm.readValue(eventText, JSON.TwilightCallIO::class.java) + synchronized(defaultComputerCSX) { + defaultComputer?.let { tmpComputer -> + if (tmpComputer.setStop) { + send(EventClass.Event.EventID.IO_NOT, object { + val avatarID = text.avatarID + val handlerID = text.handlerID + }) + } else { + val modeComponentValue = tmpComputer.modeComponentValue + send( + EventClass.Event.EventID.CALL_IO_COMPONENT, + object { + val noteID = tmpComputer.noteID + val handlerID = tmpComputer.handlerID + val avatarID = text.avatarID + val data = object { + val salt = modeComponentValue.salt + val valueMultiplier = modeComponentValue.multiplierValue + val autoMode = modeComponentValue.autoMode + val noteSaltMode = modeComponentValue.noteSaltMode + val faintNoteMode = modeComponentValue.faintNoteMode + val judgmentMode = modeComponentValue.judgmentMode + val hitPointsMode = modeComponentValue.hitPointsMode + val noteMobilityMode = modeComponentValue.noteMobilityMode + val longNoteMode = modeComponentValue.longNoteMode + val inputFavorMode = modeComponentValue.inputFavorMode + val noteModifyMode = modeComponentValue.noteModifyMode + val bpmMode = modeComponentValue.bpmMode + val waveMode = modeComponentValue.waveMode + val setNoteMode = modeComponentValue.setNoteMode + val lowestJudgmentConditionMode = modeComponentValue.lowestJudgmentConditionMode + val audioMultiplier = modeComponentValue.audioMultiplier + val highestJudgment0 = -1.0 + val higherJudgment0 = -1.0 + val highJudgment0 = -1.0 + val lowJudgment0 = -1.0 + val lowerJudgment0 = -1.0 + val lowestJudgment0 = -1.0 + val highestJudgment1 = 1.0 + val higherJudgment1 = 1.0 + val highJudgment1 = 1.0 + val lowJudgment1 = 1.0 + val lowerJudgment1 = 1.0 + val lowestJudgment1 = 1.0 + val lowestLongNoteModify = 100.0 + val highestLongNoteModify = 100.0 + val putNoteSet = 25.0 + val putNoteSetMillis = 100.0 + } + val ioHandlerID = text.handlerID + + @JvmField + val isFailMode = true + val ioMillis = text.ioMillis + val targetIOMillis = System.currentTimeMillis() + } + ) + } + } + } + } + + EventClass.Event.EventID.COMPILED_IO -> { + val text = jm.readValue(eventText, JSON.TwilightCompiledIO::class.java) + synchronized(defaultComputerCSX) { + defaultComputer?.let { tmpComputer -> + if (text.handlerID == tmpComputer.handlerID) { + if (tmpComputer.setStop) { + send( + EventClass.Event.EventID.IO_QUIT, + object { + val handlerID = text.handlerID + val avatarIDs = arrayOf(text.avatarID) + + @JvmField + val isBanned = true + } + ) + } else { + tmpComputer.twilightCompiledIOQueue.offer(text) + } + } + } + } + } + + else -> Unit + } + } + + override fun exceptionCaught(ctx: ChannelHandlerContext, cause: Throwable) { + logFault(cause) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/awilight/AwilightSite.kt b/src/main/kotlin/net/taehui/twilight/awilight/AwilightSite.kt new file mode 100644 index 0000000..b9a0fd4 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/awilight/AwilightSite.kt @@ -0,0 +1,41 @@ +package net.taehui.twilight.awilight + +import net.taehui.twilight.JSON + +class AwilightSite( + val siteID: String, + val isNetSite: Boolean, + var noteID: String, + var noteIDs: Array? = null +) { + var isSiteHand = false + var avatarConfigure = 0 + var siteSituation = 0 + var isNetAllowed = false + + fun setAvatarConfigure(isSiteHand: Boolean, avatarConfigure: Int) { + this.isSiteHand = isSiteHand + this.avatarConfigure = avatarConfigure + } + + fun setSIteSituation(siteSituation: Int) { + this.siteSituation = siteSituation + } + + fun setNetAllowed(data: Array, avatarID: String) { + val availableAvatars = data.filter { it.avatarID != avatarID && !it.avatarID.startsWith("@") } + isNetAllowed = + if (isSiteHand) availableAvatars.isNotEmpty() && availableAvatars.all { it.avatarConfigure == AVATAR_CONFIGURE_LEVYING } else avatarConfigure == AVATAR_CONFIGURE_DEFAULT + } + + fun setSiteNetData(twilightCallSiteNet: JSON.TwilightCallSiteNet) { + noteIDs = twilightCallSiteNet.noteIDs + noteID = twilightCallSiteNet.noteID + } + + companion object { + const val AVATAR_CONFIGURE_DEFAULT = 0 + const val AVATAR_CONFIGURE_LEVYING = 2 + const val SITE_SITUATION_DEFAULT = 0 + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/awilight/Component.kt b/src/main/kotlin/net/taehui/twilight/awilight/Component.kt new file mode 100644 index 0000000..21c1a84 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/awilight/Component.kt @@ -0,0 +1,404 @@ +package net.taehui.twilight.awilight + +import net.taehui.twilight.awilight.Component.JudgmentAssist.* + +class Component { + var millisLoopUnit = 0.0 + var levyingHeight: Double + var logicalYMillis = 0.0 + private var logicalYLoopUnit = 0.0 + var logicalYMeter = 0.0 + var millisMeter = 0.0 + + constructor(bpm: Double, loopUnit: Int) { + millisLoopUnit = 1000.0 / loopUnit + setBPM(bpm) + levyingHeight = STANDARD_HEIGHT - logicalYMillis * LEVYING_WAIT + } + + constructor(bpm: Double) { + setBPM(bpm) + levyingHeight = STANDARD_HEIGHT - logicalYMillis * LEVYING_WAIT + } + + fun setBPM(bpm: Double) { + logicalYMeter = 192.0 + millisMeter = 240000.0 / bpm + logicalYMillis = logicalYMeter / millisMeter + logicalYLoopUnit = millisLoopUnit * logicalYMillis + } + + enum class JudgmentAssist { + DEFAULT, LONG_NOTE_UP + } + + enum class InputMode { + VOID_0, + VOID_1, + VOID_2, + VOID_3, + INPUT_MODE_4, + INPUT_MODE_5, + INPUT_MODE_6, + INPUT_MODE_7, + INPUT_MODE_8, + INPUT_MODE_9, + INPUT_MODE_51, + INPUT_MODE_71, + INPUT_MODE_102, + INPUT_MODE_142, + INPUT_MODE_10, + INPUT_MODE_242, + INPUT_MODE_484; + } + + enum class Judged(val value: Int) { + NOT(-1), + HIGHEST(0), + HIGHER(1), + HIGH(2), + LOW(3), + LOWER(4), + LOWEST(5) + } + + enum class NoteVariety { + VOID_0, + BMS, + VOID_2, + BMSON, + VOID_4, + EVENT_NOTE + } + + companion object { + const val STANDARD_HEIGHT = 720.0 + const val STANDARD_BPM = 130.0 + const val STANDARD_METER = 192 + const val LEVYING_WAIT = 3000.0 + const val QUIT_WAIT = 2000.0 + private val JUDGMENT_MAP = arrayOfNulls(6) + private val IS_IN_2P = arrayOfNulls(17) + val STAND_MAP = DoubleArray(6) + val POINT_MAP = DoubleArray(6) + val HIT_POINTS_MAP = DoubleArray(6) + val INPUT_COUNTS = IntArray(17) + val AUTOABLE_INPUTS = arrayOfNulls(17) + val NET_DRAWINGS = arrayOfNulls(17) + + init { + HIT_POINTS_MAP[Judged.HIGHEST.value] = 1.0 + HIT_POINTS_MAP[Judged.HIGHER.value] = 0.2 / 3 + HIT_POINTS_MAP[Judged.HIGH.value] = 0.1 / 3 + HIT_POINTS_MAP[Judged.LOW.value] = 0.1 + HIT_POINTS_MAP[Judged.LOWER.value] = 0.0 + HIT_POINTS_MAP[Judged.LOWEST.value] = -0.1 / 3 + JUDGMENT_MAP[Judged.HIGHEST.value] = doubleArrayOf(-25.0, 25.0) + JUDGMENT_MAP[Judged.HIGHER.value] = doubleArrayOf(-60.0, 60.0) + JUDGMENT_MAP[Judged.HIGH.value] = doubleArrayOf(-95.0, 95.0) + JUDGMENT_MAP[Judged.LOW.value] = doubleArrayOf(-130.0, 130.0) + JUDGMENT_MAP[Judged.LOWER.value] = doubleArrayOf(-165.0, 165.0) + JUDGMENT_MAP[Judged.LOWEST.value] = doubleArrayOf(-200.0, 200.0) + POINT_MAP[Judged.HIGHEST.value] = 1.0 + POINT_MAP[Judged.HIGHER.value] = 1.0 + POINT_MAP[Judged.HIGH.value] = 0.7 + POINT_MAP[Judged.LOW.value] = 0.5 + POINT_MAP[Judged.LOWER.value] = 0.3 + POINT_MAP[Judged.LOWEST.value] = 0.0 + STAND_MAP[Judged.HIGHEST.value] = 1.0 + STAND_MAP[Judged.HIGHER.value] = 0.9 + STAND_MAP[Judged.HIGH.value] = 0.1 + STAND_MAP[Judged.LOW.value] = 0.01 + STAND_MAP[Judged.LOWER.value] = 0.0 + STAND_MAP[Judged.LOWEST.value] = 0.0 + INPUT_COUNTS[InputMode.INPUT_MODE_4.ordinal] = 4 + INPUT_COUNTS[InputMode.INPUT_MODE_5.ordinal] = 5 + INPUT_COUNTS[InputMode.INPUT_MODE_6.ordinal] = 6 + INPUT_COUNTS[InputMode.INPUT_MODE_7.ordinal] = 7 + INPUT_COUNTS[InputMode.INPUT_MODE_8.ordinal] = 8 + INPUT_COUNTS[InputMode.INPUT_MODE_9.ordinal] = 9 + INPUT_COUNTS[InputMode.INPUT_MODE_10.ordinal] = 10 + INPUT_COUNTS[InputMode.INPUT_MODE_51.ordinal] = 6 + INPUT_COUNTS[InputMode.INPUT_MODE_71.ordinal] = 8 + INPUT_COUNTS[InputMode.INPUT_MODE_102.ordinal] = 12 + INPUT_COUNTS[InputMode.INPUT_MODE_142.ordinal] = 16 + INPUT_COUNTS[InputMode.INPUT_MODE_242.ordinal] = 26 + INPUT_COUNTS[InputMode.INPUT_MODE_484.ordinal] = 52 + AUTOABLE_INPUTS[InputMode.INPUT_MODE_4.ordinal] = IntArray(0) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_5.ordinal] = IntArray(0) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_6.ordinal] = IntArray(0) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_7.ordinal] = IntArray(0) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_8.ordinal] = IntArray(0) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_9.ordinal] = IntArray(0) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_10.ordinal] = IntArray(0) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_51.ordinal] = intArrayOf(1) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_71.ordinal] = intArrayOf(1) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_102.ordinal] = intArrayOf(1, 12) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_142.ordinal] = intArrayOf(1, 16) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_242.ordinal] = intArrayOf(1, 26) + AUTOABLE_INPUTS[InputMode.INPUT_MODE_484.ordinal] = intArrayOf(1, 2, 51, 52) + IS_IN_2P[InputMode.INPUT_MODE_4.ordinal] = BooleanArray(5) + IS_IN_2P[InputMode.INPUT_MODE_5.ordinal] = BooleanArray(6) + IS_IN_2P[InputMode.INPUT_MODE_6.ordinal] = BooleanArray(7) + IS_IN_2P[InputMode.INPUT_MODE_7.ordinal] = BooleanArray(8) + IS_IN_2P[InputMode.INPUT_MODE_8.ordinal] = BooleanArray(9) + IS_IN_2P[InputMode.INPUT_MODE_9.ordinal] = BooleanArray(10) + IS_IN_2P[InputMode.INPUT_MODE_51.ordinal] = BooleanArray(7) + IS_IN_2P[InputMode.INPUT_MODE_71.ordinal] = BooleanArray(9) + IS_IN_2P[InputMode.INPUT_MODE_102.ordinal] = + booleanArrayOf(false, false, false, false, false, false, false, true, true, true, true, true, true) + IS_IN_2P[InputMode.INPUT_MODE_142.ordinal] = booleanArrayOf( + false, + false, + false, + false, + false, + false, + false, + false, + false, + true, + true, + true, + true, + true, + true, + true, + true + ) + IS_IN_2P[InputMode.INPUT_MODE_242.ordinal] = BooleanArray(27) + IS_IN_2P[InputMode.INPUT_MODE_484.ordinal] = BooleanArray(53) + val averageColor1 = 65535 + val averageColor2 = 4294967295.toInt() + val averageColor3 = 4294902015.toInt() + val averageColor4 = 16777215 + NET_DRAWINGS[InputMode.INPUT_MODE_4.ordinal] = + intArrayOf(0, averageColor2, averageColor3, averageColor3, averageColor2) + NET_DRAWINGS[InputMode.INPUT_MODE_5.ordinal] = + intArrayOf(0, averageColor2, averageColor3, averageColor4, averageColor3, averageColor2) + NET_DRAWINGS[InputMode.INPUT_MODE_6.ordinal] = + intArrayOf(0, averageColor2, averageColor3, averageColor2, averageColor2, averageColor3, averageColor2) + NET_DRAWINGS[InputMode.INPUT_MODE_7.ordinal] = intArrayOf( + 0, + averageColor2, + averageColor3, + averageColor2, + averageColor4, + averageColor2, + averageColor3, + averageColor2 + ) + NET_DRAWINGS[InputMode.INPUT_MODE_8.ordinal] = + intArrayOf( + 0, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor3, + averageColor2, + averageColor3, + averageColor2 + ) + NET_DRAWINGS[InputMode.INPUT_MODE_9.ordinal] = + intArrayOf( + 0, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor4, + averageColor3, + averageColor2, + averageColor3, + averageColor2 + ) + NET_DRAWINGS[InputMode.INPUT_MODE_10.ordinal] = + intArrayOf( + 0, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2 + ) + NET_DRAWINGS[InputMode.INPUT_MODE_51.ordinal] = + intArrayOf(0, averageColor1, averageColor2, averageColor3, averageColor4, averageColor3, averageColor2) + NET_DRAWINGS[InputMode.INPUT_MODE_71.ordinal] = + intArrayOf( + 0, + averageColor1, + averageColor2, + averageColor3, + averageColor2, + averageColor4, + averageColor2, + averageColor3, + averageColor2 + ) + NET_DRAWINGS[InputMode.INPUT_MODE_102.ordinal] = intArrayOf( + 0, + averageColor1, + averageColor2, + averageColor3, + averageColor4, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor4, + averageColor3, + averageColor2, + averageColor1 + ) + NET_DRAWINGS[InputMode.INPUT_MODE_142.ordinal] = intArrayOf( + 0, + averageColor1, + averageColor2, + averageColor3, + averageColor2, + averageColor4, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor4, + averageColor2, + averageColor3, + averageColor2, + averageColor1 + ) + NET_DRAWINGS[InputMode.INPUT_MODE_242.ordinal] = intArrayOf( + 0, + averageColor1, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor1 + ) + NET_DRAWINGS[InputMode.INPUT_MODE_484.ordinal] = intArrayOf( + 0, + averageColor1, + averageColor1, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor3, + averageColor2, + averageColor1, + averageColor1 + ) + } + + fun getJudgmentMillis(judged: Judged, judgmentStage: Double, i: Int, judgmentAssist: JudgmentAssist): Double { + var judgmentMillis = JUDGMENT_MAP[judged.value]!![i] * 10 / (judgmentStage + 10) + when (judgmentAssist) { + DEFAULT -> Unit + LONG_NOTE_UP -> judgmentMillis *= 1.5 + } + return judgmentMillis + } + + fun getIsJudgment( + loopingCounter: Double, + judged: Judged, + judgmentStage: Double, + judgmentAssist: JudgmentAssist + ): Boolean { + return getJudgmentMillis( + judged, + judgmentStage, + 0, + judgmentAssist + ) <= loopingCounter && loopingCounter <= getJudgmentMillis(judged, judgmentStage, 1, judgmentAssist) + } + + fun getJudged(judgmentMeter: Double, judgmentStage: Double, judgmentAssist: JudgmentAssist): Judged { + if (getIsJudgment(judgmentMeter, Judged.HIGHEST, judgmentStage, judgmentAssist)) { + return Judged.HIGHEST + } else if (getIsJudgment(judgmentMeter, Judged.HIGHER, judgmentStage, judgmentAssist)) { + return Judged.HIGHER + } else if (getIsJudgment(judgmentMeter, Judged.HIGH, judgmentStage, judgmentAssist)) { + return Judged.HIGH + } else if (getIsJudgment(judgmentMeter, Judged.LOW, judgmentStage, judgmentAssist)) { + return Judged.LOW + } else if (getIsJudgment(judgmentMeter, Judged.LOWER, judgmentStage, judgmentAssist)) { + return Judged.LOWER + } else if (getIsJudgment(judgmentMeter, Judged.LOWEST, judgmentStage, judgmentAssist)) { + return Judged.LOWEST + } + return Judged.NOT + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/awilight/DefaultCompute.kt b/src/main/kotlin/net/taehui/twilight/awilight/DefaultCompute.kt new file mode 100644 index 0000000..24ba173 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/awilight/DefaultCompute.kt @@ -0,0 +1,576 @@ +package net.taehui.twilight.awilight + +import net.taehui.CommentClass +import net.taehui.EventClass +import net.taehui.twilight.BaseCompiler +import net.taehui.twilight.Computing +import net.taehui.twilight.JSON +import net.taehui.twilight.Utility.getDistance +import net.taehui.twilight.note.BaseNote +import net.taehui.twilight.note.InputNote +import net.taehui.twilight.note.JudgedNoteData +import net.taehui.twilight.note.JudgedNoteData.ID +import org.apache.commons.lang3.time.StopWatch +import java.nio.file.Files +import java.nio.file.Path +import java.util.* +import java.util.concurrent.ConcurrentLinkedQueue +import kotlin.math.abs + +class DefaultCompute(val avatar: AwilightAvatar, val handlerID: String, val site: AwilightSite) : Computing() { + val ioAvatarIDs = mutableListOf() + val pendingIOAvatarIDs = mutableListOf() + private val sentIOAvatarIDs = mutableListOf() + val modeComponentValue = ModeComponent() + val comment: CommentClass.Comment.Builder = + CommentClass.Comment.newBuilder().setDate("2.0.0") + private val handlingNotes = mutableListOf() + val notes = mutableListOf() + val waitAudioNoteMap = TreeSet() + val waitMediaNoteMap = TreeSet() + val waitBPMMap = TreeMap() + val netDrawings = mutableListOf() + private val r = Random() + private lateinit var noteFileContents: ByteArray + var setStop = false + var targetStand = 0 + var isF = false + private var targetHitPoints = 1.0 + private var isFailed = false + private var lastJudged = Component.Judged.NOT + private var targetBand = 0 + private var highestBand = 0 + private var targetPoint = 1.0 + private var savedPoint = 0.0 + private var totalPoint = 0.0 + private var savedStand = 0.0 + private var earlyValue = 0 + private var lateValue = 0 + val twilightCompiledIOQueue = ConcurrentLinkedQueue() + + fun stop() { + setStop = true + avatar.send(EventClass.Event.EventID.COMPILED, object { + val siteID = site.siteID + val handlerID = this@DefaultCompute.handlerID + + @JvmField + val isCompiled = false + }) + } + + private fun setNoteJudged(inputNote: BaseNote, judged: Component.Judged) { + inputNote.judged = judged + if (sentIOAvatarIDs.isNotEmpty()) { + avatar.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_JUDGE + qwilightIOJudge = EventClass.Event.QwilightIOJudge.newBuilder().apply { + handlerID = this@DefaultCompute.handlerID + addAllAvatarIDs(sentIOAvatarIDs) + noteID = inputNote.noteID + this.judged = judged.value + }.build() + } + ) + } + } + + private fun setNoteFailed(note: BaseNote, setValidJudgedNotes: Boolean) { + note.isFailed = true + if (sentIOAvatarIDs.isNotEmpty()) { + avatar.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_NOTE_VISIBILITY + qwilightIONoteVisibility = EventClass.Event.QwilightIONoteVisibility.newBuilder().apply { + handlerID = this@DefaultCompute.handlerID + addAllAvatarIDs(sentIOAvatarIDs) + noteID = note.noteID + this.setValidJudgedNotes = setValidJudgedNotes + setNoteFailed = true + }.build() + } + ) + } + } + + private fun wipeNotes(note: BaseNote, setValidJudgedNotes: Boolean) { + handlingNotes.remove(note) + if (note.hasStand() && sentIOAvatarIDs.isNotEmpty()) { + avatar.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_NOTE_VISIBILITY + qwilightIONoteVisibility = EventClass.Event.QwilightIONoteVisibility.newBuilder().apply { + handlerID = this@DefaultCompute.handlerID + addAllAvatarIDs(sentIOAvatarIDs) + this.noteID = note.noteID + this.setValidJudgedNotes = setValidJudgedNotes + setNoteFailed = false + }.build() + } + ) + } + } + + fun handleCompile(noteFilePath: Path) { + noteFileContents = Files.readAllBytes(noteFilePath) + BaseCompiler.handleCompile(this, noteFileContents) + avatar.send(EventClass.Event.EventID.COMPILED, object { + val siteID = site.siteID + val handlerID = this@DefaultCompute.handlerID + + @JvmField + val isCompiled = true + }) + } + + fun handleNotes(w: Double) { + modeComponentValue.bpm = bpm + comment.levyingMultiplier = modeComponentValue.getPaidMultiplier() + comment.levyingAudioMultiplier = modeComponentValue.audioMultiplier + val inputCount = Component.INPUT_COUNTS[inputMode.ordinal] + val drawingComponent = EventClass.Event.DrawingComponent.newBuilder().apply { + this.p2BuiltLength = (InputNote.NOTE_LENGTH * inputCount).toFloat() + this.judgmentMainPosition = Component.STANDARD_HEIGHT.toFloat() + }.build() + var handlingID = 0 + var loopingCounter = -Component.LEVYING_WAIT + val valueComponent = Component(levyingBPM, 60) + var logicalY = 0.0 + val endNoteID = notes.size + var handledNotYet = true + val inputMillisMap = DoubleArray(53) + val waitBPMQueue = LinkedList>(waitBPMMap.entries) + val rawInputQueue = LinkedList() + val inputMap = BooleanArray(53) + val inputCoolMillisMap = DoubleArray(53) + val loopingHandler = StopWatch.createStarted() + while (!setStop) { + fun onNoteJudged(judgedNote: BaseNote) { + val judged = judgedNote.judged + if (judged == Component.Judged.LOWEST) { + targetBand = 0 + } else { + highestBand = (++targetBand).coerceAtLeast(highestBand) + } + when (judged) { + Component.Judged.HIGHEST -> comment.highestJudgment += 1 + Component.Judged.HIGHER -> comment.higherJudgment += 1 + Component.Judged.HIGH -> comment.highJudgment += 1 + Component.Judged.LOW -> comment.lowJudgment += 1 + Component.Judged.LOWER -> comment.lowerJudgment += 1 + Component.Judged.LOWEST -> { + comment.lowestJudgment += 1 + isFailed = true + } + + else -> Unit + } + lastJudged = judged + targetPoint = Component.POINT_MAP[judged.value] + .let { savedPoint += it; savedPoint } / Component.POINT_MAP[Component.Judged.HIGHEST.value].let { totalPoint += it; totalPoint } + targetStand = + (1000000 * ((Component.STAND_MAP[judged.value]) + .let { savedStand += it; savedStand }) / (totalNotes * Component.STAND_MAP[Component.Judged.HIGHEST.value])).toInt() + targetHitPoints += (if (judged != Component.Judged.LOWEST) hitPointsValue else 1.5 * targetHitPoints + 0.5) * Component.HIT_POINTS_MAP[judged.value] + targetHitPoints = targetHitPoints.coerceIn(0.0, 1.0) + comment.addPaints( + CommentClass.PaintEvent.newBuilder().setWait(loopingCounter).setHitPoints(targetHitPoints) + .setStand(targetStand) + .setBand(targetBand) + .setPoint(targetPoint).build() + ) + } + + fun setJudgmentMeter( + loopingCounter: Double, + input: Int, + judgmentMeter: Double, + judgmentAssist: Component.JudgmentAssist + ) { + comment.addJudgmentMeters( + CommentClass.JudgmentMeterEvent.newBuilder().setJudgmentMeter(judgmentMeter) + .setWait(loopingCounter - judgmentMeter).setAssist(judgmentAssist.ordinal).build() + ) + if (judgmentMeter > 0.0) { + ++lateValue + } else if (judgmentMeter < 0.0) { + ++earlyValue + } + if (sentIOAvatarIDs.isNotEmpty()) { + avatar.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_JUDGMENT_METER + qwilightIOJudgmentMeter = EventClass.Event.QwilightIOJudgmentMeter.newBuilder().apply { + addAllAvatarIDs(sentIOAvatarIDs) + handlerID = this@DefaultCompute.handlerID + this.judgmentMeter = judgmentMeter + this.input = input + this.assist = judgmentAssist.ordinal + }.build() + } + ) + } + } + + fun handleJudged(judgedNote: BaseNote, judgedNoteData: JudgedNoteData?, loopingCounter: Double) { + judgedNoteData?.let { + val input = judgedNote.input + val judged = it.judged + when (it.valueID) { + ID.NOTE_JUDGMENT -> { + setNoteJudged(judgedNote, judged) + wipeNotes(judgedNote, false) + setJudgmentMeter(loopingCounter, input, it.judgmentMeter, Component.JudgmentAssist.DEFAULT) + onNoteJudged(judgedNote) + } + + ID.TRAP_NOTE_JUDGMENT -> { + setNoteJudged(judgedNote, judged) + wipeNotes(judgedNote, false) + onNoteJudged(judgedNote) + } + + ID.QUIT_LONG_NOTE_JUDGMENT, ID.AUTO_LONG_NOTE_JUDGMENT -> { + setNoteJudged(judgedNote, judged) + wipeNotes(judgedNote, false) + setJudgmentMeter( + loopingCounter, + input, + it.judgmentMeter, + Component.JudgmentAssist.LONG_NOTE_UP + ) + onNoteJudged(judgedNote) + } + + ID.LEVY_LONG_NOTE_JUDGMENT -> { + if (judged == Component.Judged.LOWEST) { + setNoteFailed(judgedNote, true) + } + setNoteJudged(judgedNote, judged) + setJudgmentMeter(loopingCounter, input, it.judgmentMeter, Component.JudgmentAssist.DEFAULT) + onNoteJudged(judgedNote) + } + + ID.FAILED_LONG_NOTE_JUDGMENT -> { + setNoteFailed(judgedNote, false) + setNoteJudged(judgedNote, Component.Judged.LOWEST) + onNoteJudged(judgedNote) + } + + else -> Unit + } + } + } + + fun sendCallNetEvent(avatarNetStatus: EventClass.Event.AvatarNetStatus) { + avatar.send(EventClass.Event.newBuilder().apply { + this.eventID = EventClass.Event.EventID.CALL_NET + this.qwilightCallNet = EventClass.Event.QwilightCallNet.newBuilder().apply { + this.siteID = site.siteID + this.handlerID = this@DefaultCompute.handlerID + this.hitPointsMode = modeComponentValue.hitPointsMode + this.avatarNetStatus = avatarNetStatus + this.stand = targetStand + this.highestBand = this@DefaultCompute.highestBand + this.point = targetPoint + this.hitPoints = targetHitPoints + this.isFailed = this@DefaultCompute.isFailed + this.lastJudged = this@DefaultCompute.lastJudged.value + if (avatarNetStatus != EventClass.Event.AvatarNetStatus.Default) { + this.title = this@DefaultCompute.title + this.artist = this@DefaultCompute.artist + this.genre = this@DefaultCompute.genre + this.level = this@DefaultCompute.level + this.levelText = this@DefaultCompute.levelText + this.wantLevelID = "" + val modeComponentValue = this@DefaultCompute.modeComponentValue + val comment = this@DefaultCompute.comment + this.autoMode = modeComponentValue.autoMode + this.noteSaltMode = modeComponentValue.noteSaltMode + this.audioMultiplier = comment.levyingAudioMultiplier + this.faintNoteMode = modeComponentValue.faintNoteMode + this.judgmentMode = modeComponentValue.judgmentMode + this.noteMobilityMode = modeComponentValue.noteMobilityMode + this.inputFavorMode = modeComponentValue.inputFavorMode + this.longNoteMode = modeComponentValue.longNoteMode + this.noteModifyMode = modeComponentValue.noteModifyMode + this.bpmMode = modeComponentValue.bpmMode + this.waveMode = modeComponentValue.waveMode + this.setNoteMode = modeComponentValue.setNoteMode + this.lowestJudgmentConditionMode = modeComponentValue.lowestJudgmentConditionMode + this.totalNotes = this@DefaultCompute.totalNotes + this.judgmentStage = this@DefaultCompute.judgmentStage + this.hitPointsValue = this@DefaultCompute.hitPointsValue + this.highestInputCount = this@DefaultCompute.highestInputCount + this.length = this@DefaultCompute.length + this.bpm = this@DefaultCompute.bpm + this.multiplier = comment.levyingMultiplier + this.inputMode = this@DefaultCompute.inputMode.ordinal + addData(comment.build().toByteString()) + } else { + this.drawingComponent = drawingComponent + this.addAllDrawings(this@DefaultCompute.netDrawings) + } + }.build() + }) + isFailed = false + } + + val lastLoopingCounter = loopingCounter + loopingCounter += valueComponent.millisLoopUnit + if (loopingCounter > length + Component.QUIT_WAIT && handledNotYet) { + handledNotYet = false + if (!isF) { + sendCallNetEvent(EventClass.Event.AvatarNetStatus.Clear) + } + } + + while (true) { + val twilightCompiledIO = twilightCompiledIOQueue.poll() + if (twilightCompiledIO != null) { + if (twilightCompiledIO.isCompiled) { + ioAvatarIDs.add(twilightCompiledIO.avatarID) + pendingIOAvatarIDs.add(twilightCompiledIO.avatarID) + } else { + ioAvatarIDs.remove(twilightCompiledIO.avatarID) + pendingIOAvatarIDs.remove(twilightCompiledIO.avatarID) + sentIOAvatarIDs.remove(twilightCompiledIO.avatarID) + } + } else { + break + } + } + + // 인공지능 + for (i in inputCount downTo 1) { + val powValue0 = 125.0 * r.nextGaussian(0.0, 1 - w) + val powValue1 = abs(r.nextGaussian(0.0, w) * valueComponent.millisLoopUnit) + + inputCoolMillisMap[i] = 0.0.coerceAtLeast(inputCoolMillisMap[i] - valueComponent.millisLoopUnit) + if (inputCoolMillisMap[i] == 0.0) { + if (inputMap[i]) { + rawInputQueue.offer(-i) + inputMap[i] = false + } else { + handlingNotes + .filter { it.hasStand() && it.input == i && it.judged == Component.Judged.NOT } + .minByOrNull { it.wait } + ?.let { + if (it.wait + inputMillisMap[i] <= loopingCounter) { + rawInputQueue.offer(i) + inputMap[i] = true + + inputCoolMillisMap[i] += it.longWait + powValue0 + inputMillisMap[i] = powValue0 + } + } + } + } + + val highestJudgmentMillis0 = + Component.getJudgmentMillis( + Component.Judged.HIGHEST, + judgmentStage, + 0, + Component.JudgmentAssist.DEFAULT + ) - valueComponent.millisLoopUnit + val highestJudgmentMillis1 = + Component.getJudgmentMillis( + Component.Judged.HIGHEST, + judgmentStage, + 1, + Component.JudgmentAssist.DEFAULT + ) + if (inputMillisMap[i] < highestJudgmentMillis0) { + inputMillisMap[i] = inputMillisMap[i] + powValue1 + } else if (highestJudgmentMillis1 < inputMillisMap[i]) { + inputMillisMap[i] = inputMillisMap[i] - powValue1 + } + } + + // 렌더링 스레드 + netDrawings.clear() + for (i in inputMap.size - 1 downTo 1) { + if (inputMap[i]) { + netDrawings.add(EventClass.Event.NetDrawing.newBuilder().apply { + this.drawingVariety = EventClass.Event.NetDrawing.Variety.Main + this.param = Component.NET_DRAWINGS[inputMode.ordinal]!![i] - 128 + this.position0 = (i - 1) * InputNote.NOTE_LENGTH + this.position1 = 0.0 + this.length = InputNote.NOTE_LENGTH + this.height = Component.STANDARD_HEIGHT + }.build()) + } + } + handlingNotes.forEach { + it.paint(this) + } + + if (pendingIOAvatarIDs.isNotEmpty()) { + avatar.send( + EventClass.Event.EventID.LEVY_IO, + object { + val avatarIDs = pendingIOAvatarIDs + val handlerID = this@DefaultCompute.handlerID + val levyingWait = loopingCounter + + @JvmField + val isF = this@DefaultCompute.isF + val multiplier = modeComponentValue.getPaidMultiplier() + val audioMultiplier = modeComponentValue.audioMultiplier + val ioMillis = System.currentTimeMillis() + }, + comment.build().toByteString() + ) + sentIOAvatarIDs.addAll(pendingIOAvatarIDs) + pendingIOAvatarIDs.clear() + } + + while (endNoteID > handlingID) { + val note = notes[handlingID] + if (note.isClose(loopingCounter, logicalY)) { + handlingNotes.add(note) + ++handlingID + } else { + break + } + } + + val distance = getDistance( + valueComponent, + waitBPMQueue, + lastLoopingCounter, + loopingCounter + ) + logicalY -= distance + + for (i in handlingNotes.size - 1 downTo 0) { + fun handleAutoJudged(note: BaseNote): Boolean { + return when (note.autoJudge(loopingCounter)?.valueID) { + ID.NOT -> true + else -> false + } + } + + val handlingNote = handlingNotes[i] + handlingNote.doMove(distance) + if (handleAutoJudged(handlingNote)) { + wipeNotes(handlingNote, false) + } else { + if (handlingNote.hasStand()) { + if (handlingNote.isFailedAsTooLate( + loopingCounter, + judgmentStage + ) && handlingNote.judged == Component.Judged.NOT + ) { + setNoteJudged(handlingNote, Component.Judged.LOWEST) + if (handlingNote.longWait > 0.0) { + setNoteFailed(handlingNote, true) + } else { + wipeNotes(handlingNote, false) + } + onNoteJudged(handlingNote) + } + if (handlingNote.judged != Component.Judged.NOT && handlingNote.isTooLong( + loopingCounter, + judgmentStage + ) + ) { + if (!handlingNote.isFailed) { + if (isAutoLongNote) { + setNoteJudged(handlingNote, handlingNote.judged) + onNoteJudged(handlingNote) + } else { + setNoteJudged(handlingNote, Component.Judged.LOWER) + onNoteJudged(handlingNote) + } + } + wipeNotes(handlingNote, isAutoLongNote) + } + } + } + } + + while (true) { + val rawInput = rawInputQueue.poll() + if (rawInput != null) { + val isInput = rawInput > 0 + val absInput = abs(rawInput) + comment.addInputs( + CommentClass.InputEvent.newBuilder().setInput(rawInput).setWait(loopingCounter).build() + ) + if (sentIOAvatarIDs.isNotEmpty()) { + avatar.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_INPUT + qwilightIOInput = EventClass.Event.QwilightIOInput.newBuilder().apply { + handlerID = this@DefaultCompute.handlerID + addAllAvatarIDs(sentIOAvatarIDs) + this.input = rawInput + power = UByte.MAX_VALUE.toInt() + }.build() + } + ) + } + + var wasHandled = false + handlingNotes + .filter { it.input == absInput && !it.isFailed && it.hasStand() && (!isInput || it.judged == Component.Judged.NOT) } + .minByOrNull { it.wait } + ?.let { + val judgedNoteData = it.judge(rawInput, loopingCounter, judgmentStage, isAutoLongNote) + if (judgedNoteData != null) { + handleJudged(it, judgedNoteData, loopingCounter) + } + wasHandled = true + } + + if (!wasHandled) { + handlingNotes + .minByOrNull { it.wait } + ?.let { + if (it.input == absInput && !it.isFailed && !it.hasStand()) { + val judgedNoteData = + it.judge(rawInput, loopingCounter, judgmentStage, isAutoLongNote) + if (judgedNoteData != null) { + handleJudged(it, judgedNoteData, loopingCounter) + wasHandled = true + } + } + } + } + } else { + break + } + } + + if (targetHitPoints == 0.0 && !isF) { + isF = true + sendCallNetEvent(EventClass.Event.AvatarNetStatus.Failed) + isFailed = false + } + + if (!isF) { + sendCallNetEvent(EventClass.Event.AvatarNetStatus.Default) + } + + val toLoop = loopingCounter - (loopingHandler.time - Component.LEVYING_WAIT) + if (toLoop > 0) { + Thread.sleep(toLoop.toLong()) + } + } + if (ioAvatarIDs.isNotEmpty()) { + avatar.send( + EventClass.Event.EventID.IO_QUIT, + object { + val handlerID = this@DefaultCompute.handlerID + val avatarIDs = ioAvatarIDs + + @JvmField + val isBanned = false + } + ) + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/awilight/ModeComponent.kt b/src/main/kotlin/net/taehui/twilight/awilight/ModeComponent.kt new file mode 100644 index 0000000..ed44ba0 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/awilight/ModeComponent.kt @@ -0,0 +1,25 @@ +package net.taehui.twilight.awilight + +class ModeComponent { + val multiplierValue = 1000.0 + val autoMode = 0 + val noteSaltMode = 0 + val faintNoteMode = 0 + val judgmentMode = 1 + val hitPointsMode = 1 + val noteMobilityMode = 0 + val longNoteMode = 0 + val inputFavorMode = 0 + val noteModifyMode = 0 + val bpmMode = 0 + val waveMode = 0 + val setNoteMode = 0 + val lowestJudgmentConditionMode = 0 + val audioMultiplier = 1.0 + val salt = System.currentTimeMillis().toInt() + var bpm = Component.STANDARD_BPM + + fun getPaidMultiplier(): Double { + return multiplierValue / (bpm * audioMultiplier) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/note/BaseNote.kt b/src/main/kotlin/net/taehui/twilight/note/BaseNote.kt new file mode 100644 index 0000000..2b8497c --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/note/BaseNote.kt @@ -0,0 +1,70 @@ +package net.taehui.twilight.note + +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute + +abstract class BaseNote(val logicalY: Double, val wait: Double) : Comparable { + var noteID = 0 + private var y = 0.0 + var isFailed = false + var longWait = 0.0 + var longHeight = 0.0 + var judged = Component.Judged.NOT + var input = 0 + abstract val logicalLayer: Int + abstract val layer: Int + + open fun hasStand(): Boolean { + return false + } + + open fun isFailedAsTooLate(wait: Double, judgmentStage: Double): Boolean { + return false + } + + open fun isTooLong(wait: Double, judgmentStage: Double): Boolean { + return false + } + + override fun compareTo(other: BaseNote): Int { + if (wait > other.wait) { + return 1 + } else if (wait < other.wait) { + return -1 + } + if (logicalLayer > other.logicalLayer) { + return 1 + } else if (logicalLayer < other.logicalLayer) { + return -1 + } + if (input > other.input) { + return 1 + } else if (input < other.input) { + return -1 + } + return 0 + } + + fun getY(multiplier: Double): Double { + return (y - Component.STANDARD_HEIGHT) * multiplier + Component.STANDARD_HEIGHT + } + + fun doMove(distance: Double) { + y += distance + } + + fun isClose(wait: Double, logicalY: Double): Boolean { + return if (this.wait - wait <= Component.LEVYING_WAIT) { + y = this.logicalY - logicalY + true + } else { + false + } + } + + abstract fun judge(input: Int, wait: Double, judgmentStage: Double, isAutoLongNote: Boolean): JudgedNoteData? + + abstract fun autoJudge(wait: Double): JudgedNoteData? + + abstract fun paint(defaultComputer: DefaultCompute) +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/note/InputNote.kt b/src/main/kotlin/net/taehui/twilight/note/InputNote.kt new file mode 100644 index 0000000..ea6e316 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/note/InputNote.kt @@ -0,0 +1,70 @@ +package net.taehui.twilight.note + +import net.taehui.EventClass +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute +import net.taehui.twilight.note.JudgedNoteData.ID + +open class InputNote(logicalY: Double, wait: Double, input: Int) : BaseNote(logicalY, wait) { + override val logicalLayer: Int + get() = 1 + override val layer: Int + get() = if (longWait > 0.0) 3 else 4 + + override fun hasStand(): Boolean { + return true + } + + init { + this.input = input + } + + override fun isFailedAsTooLate(wait: Double, judgmentStage: Double): Boolean { + return wait - this.wait >= Component.getJudgmentMillis( + Component.Judged.LOWEST, + judgmentStage, + 1, + Component.JudgmentAssist.DEFAULT + ) + } + + override fun autoJudge(wait: Double): JudgedNoteData? { + return null + } + + override fun judge(input: Int, wait: Double, judgmentStage: Double, isAutoLongNote: Boolean): JudgedNoteData? { + if (input > 0) { + val judgmentMeter = wait - this.wait + val judged = Component.getJudged(judgmentMeter, judgmentStage, Component.JudgmentAssist.DEFAULT) + if (judged != Component.Judged.NOT) { + return JudgedNoteData(ID.NOTE_JUDGMENT, judgmentMeter, judged) + } + } + return null + } + + override fun paint(defaultComputer: DefaultCompute) { + val multiplier = defaultComputer.modeComponentValue.getPaidMultiplier() + if (multiplier > 0.0) { + val position1 = getY(multiplier) - NOTE_HEIGHT + NOTE_HEIGHT_JUDGMENT + if (position1 + NOTE_HEIGHT > 0.0) { + defaultComputer.netDrawings.add( + EventClass.Event.NetDrawing.newBuilder().apply { + this.drawingVariety = EventClass.Event.NetDrawing.Variety.Note + this.param = Component.NET_DRAWINGS[defaultComputer.inputMode.ordinal]!![input] + this.position0 = (input - 1) * NOTE_LENGTH + this.position1 = position1 + this.length = NOTE_LENGTH + this.height = NOTE_HEIGHT + }.build() + ) + } + } + } + + companion object { + const val NOTE_LENGTH = 51.0 + const val NOTE_HEIGHT = 11.0 + const val NOTE_HEIGHT_JUDGMENT = NOTE_HEIGHT / 2 + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/note/JudgedNoteData.kt b/src/main/kotlin/net/taehui/twilight/note/JudgedNoteData.kt new file mode 100644 index 0000000..726d954 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/note/JudgedNoteData.kt @@ -0,0 +1,15 @@ +package net.taehui.twilight.note + +import net.taehui.twilight.awilight.Component + +class JudgedNoteData(val valueID: ID, val judgmentMeter: Double, val judged: Component.Judged) { + enum class ID { + NOT, + NOTE_JUDGMENT, + TRAP_NOTE_JUDGMENT, + LEVY_LONG_NOTE_JUDGMENT, + QUIT_LONG_NOTE_JUDGMENT, + AUTO_LONG_NOTE_JUDGMENT, + FAILED_LONG_NOTE_JUDGMENT + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/note/LongNote.kt b/src/main/kotlin/net/taehui/twilight/note/LongNote.kt new file mode 100644 index 0000000..1adc072 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/note/LongNote.kt @@ -0,0 +1,114 @@ +package net.taehui.twilight.note + +import net.taehui.EventClass +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute +import net.taehui.twilight.note.JudgedNoteData.ID + +class LongNote(logicalY: Double, wait: Double, input: Int, longWait: Double, longHeight: Double) : + InputNote(logicalY, wait, input) { + override val logicalLayer: Int + get() = 2 + + init { + this.longWait = longWait + this.longHeight = longHeight + } + + override fun isTooLong(wait: Double, judgmentStage: Double): Boolean { + return wait - (wait + longWait) >= Component.getJudgmentMillis( + Component.Judged.LOWEST, + judgmentStage, + 1, + Component.JudgmentAssist.LONG_NOTE_UP + ) + } + + override fun judge(input: Int, wait: Double, judgmentStage: Double, isAutoLongNote: Boolean): JudgedNoteData? { + if (input > 0) { + if (judged == Component.Judged.NOT) { + val judgmentMeter = wait - this.wait + val judged = Component.getJudged(judgmentMeter, judgmentStage, Component.JudgmentAssist.DEFAULT) + if (judged != Component.Judged.NOT) { + return JudgedNoteData(ID.LEVY_LONG_NOTE_JUDGMENT, judgmentMeter, judged) + } + } + } else if (judged != Component.Judged.NOT) { + val longJudgmentMeter = wait - (this.wait + longWait) + return if (isAutoLongNote) { + if (Component.getIsJudgment( + longJudgmentMeter, + Component.Judged.LOWER, + judgmentStage, + Component.JudgmentAssist.LONG_NOTE_UP + ) + ) { + JudgedNoteData( + ID.AUTO_LONG_NOTE_JUDGMENT, + 0.0, + Component.Judged.HIGHEST + ) + } else JudgedNoteData( + ID.FAILED_LONG_NOTE_JUDGMENT, + 0.0, + Component.Judged.HIGHEST + ) + } else { + val judged = + Component.getJudged(longJudgmentMeter, judgmentStage, Component.JudgmentAssist.LONG_NOTE_UP) + if (judged != Component.Judged.NOT) { + JudgedNoteData(ID.QUIT_LONG_NOTE_JUDGMENT, longJudgmentMeter, judged) + } else { + JudgedNoteData(ID.FAILED_LONG_NOTE_JUDGMENT, 0.0, judged) + } + } + } + return null + } + + override fun paint(defaultComputer: DefaultCompute) { + val multiplier = defaultComputer.modeComponentValue.getPaidMultiplier() + if (multiplier > 0.0) { + val y = getY(multiplier) + val pointHeight = longHeight * multiplier + val position0 = (input - 1) * NOTE_LENGTH + val position1 = y - pointHeight + var longNoteContentsHeight = pointHeight + if (!isFailed && judged != Component.Judged.NOT) { + val longHeight = pointHeight - y + Component.STANDARD_HEIGHT + if (longHeight > 0.0) { + longNoteContentsHeight += longHeight - pointHeight + if (longNoteContentsHeight > 0.0) { + if (position1 + longNoteContentsHeight > 0.0) { + defaultComputer.netDrawings.add( + EventClass.Event.NetDrawing.newBuilder().apply { + this.drawingVariety = EventClass.Event.NetDrawing.Variety.Note + this.param = Component.NET_DRAWINGS[defaultComputer.inputMode.ordinal]!![input] + this.position0 = position0 + this.position1 = position1 + this.length = NOTE_LENGTH + this.height = longNoteContentsHeight + }.build() + ) + } + } + } + } else { + if (longNoteContentsHeight > 0.0) { + if (position1 + longNoteContentsHeight > 0.0) { + defaultComputer.netDrawings.add( + EventClass.Event.NetDrawing.newBuilder().apply { + this.drawingVariety = EventClass.Event.NetDrawing.Variety.Note + this.param = Component.NET_DRAWINGS[defaultComputer.inputMode.ordinal]!![input] + this.position0 = position0 + this.position1 = position1 + this.length = NOTE_LENGTH + this.height = longNoteContentsHeight + }.build() + ) + } + } + } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/note/MeterNote.kt b/src/main/kotlin/net/taehui/twilight/note/MeterNote.kt new file mode 100644 index 0000000..02fef92 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/note/MeterNote.kt @@ -0,0 +1,41 @@ +package net.taehui.twilight.note + +import net.taehui.EventClass +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute +import net.taehui.twilight.note.JudgedNoteData.ID + +class MeterNote(logicalY: Double, wait: Double) : BaseNote(logicalY, wait) { + override val logicalLayer: Int + get() = 3 + override val layer: Int + get() = 0 + + override fun judge(input: Int, wait: Double, judgmentStage: Double, isAutoLongNote: Boolean): JudgedNoteData? { + return null + } + + override fun autoJudge(wait: Double): JudgedNoteData? { + if (this.wait <= wait) { + judged = Component.Judged.HIGHEST + return JudgedNoteData(ID.NOT, 0.0, judged) + } + return null + } + + override fun paint(defaultComputer: DefaultCompute) { + val multiplier = defaultComputer.modeComponentValue.getPaidMultiplier() + if (multiplier > 0.0) { + val y = getY(multiplier) + if (y >= 0.0) { + defaultComputer.netDrawings.add( + EventClass.Event.NetDrawing.newBuilder().apply { + this.drawingVariety = EventClass.Event.NetDrawing.Variety.Meter + this.param = 4294967295.toInt() + this.position1 = y + }.build() + ) + } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/note/TrapNote.kt b/src/main/kotlin/net/taehui/twilight/note/TrapNote.kt new file mode 100644 index 0000000..b318c28 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/note/TrapNote.kt @@ -0,0 +1,53 @@ +package net.taehui.twilight.note + +import net.taehui.EventClass +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute +import net.taehui.twilight.note.JudgedNoteData.ID + +class TrapNote(logicalY: Double, wait: Double, input: Int, private val isPowered: Boolean = true) : + InputNote(logicalY, wait, input) { + override val logicalLayer: Int + get() = 4 + + override fun hasStand(): Boolean { + return false + } + + override fun autoJudge(wait: Double): JudgedNoteData? { + if (this.wait <= wait) { + return JudgedNoteData(ID.NOT, 0.0, judged) + } + return null + } + + override fun judge(input: Int, wait: Double, judgmentStage: Double, isAutoLongNote: Boolean): JudgedNoteData? { + if (isPowered && input > 0) { + val judgmentMeter = wait - this.wait + val judged = Component.getJudged(judgmentMeter, judgmentStage, Component.JudgmentAssist.DEFAULT) + if (Component.Judged.HIGHEST <= judged && judged <= Component.Judged.LOWER) { + return JudgedNoteData(ID.TRAP_NOTE_JUDGMENT, judgmentMeter, Component.Judged.LOWEST) + } + } + return null + } + + override fun paint(defaultComputer: DefaultCompute) { + val multiplier = defaultComputer.modeComponentValue.getPaidMultiplier() + if (multiplier > 0.0) { + val position1 = getY(multiplier) - NOTE_HEIGHT + NOTE_HEIGHT_JUDGMENT + if (position1 + NOTE_HEIGHT > 0.0) { + defaultComputer.netDrawings.add( + EventClass.Event.NetDrawing.newBuilder().apply { + this.drawingVariety = EventClass.Event.NetDrawing.Variety.Note + this.param = 65535 + this.position0 = (input - 1) * NOTE_LENGTH + this.position1 = position1 + this.length = NOTE_LENGTH + this.height = NOTE_HEIGHT + }.build() + ) + } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/note/VoidNote.kt b/src/main/kotlin/net/taehui/twilight/note/VoidNote.kt new file mode 100644 index 0000000..3824dad --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/note/VoidNote.kt @@ -0,0 +1,26 @@ +package net.taehui.twilight.note + +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.awilight.DefaultCompute +import net.taehui.twilight.note.JudgedNoteData.ID + +class VoidNote(logicalY: Double, wait: Double, input: Int) : InputNote(logicalY, wait, input) { + override val logicalLayer: Int + get() = 5 + override val layer: Int + get() = -1 + + override fun judge(input: Int, wait: Double, judgmentStage: Double, isAutoLongNote: Boolean): JudgedNoteData? { + return null + } + + override fun autoJudge(wait: Double): JudgedNoteData? { + if (this.wait <= wait) { + judged = Component.Judged.HIGHEST + return JudgedNoteData(ID.NOT, 0.0, judged) + } + return null + } + + override fun paint(defaultComputer: DefaultCompute) = Unit +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt b/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt new file mode 100644 index 0000000..4e5c9ff --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/qwilight/QwilightAvatar.kt @@ -0,0 +1,1546 @@ +package net.taehui.twilight.qwilight + +import com.fasterxml.jackson.databind.ObjectMapper +import com.google.protobuf.ByteString +import io.netty.channel.ChannelFuture +import io.netty.channel.ChannelHandlerContext +import io.netty.channel.SimpleChannelInboundHandler +import net.taehui.CommentClass +import net.taehui.EventClass +import net.taehui.twilight.* +import net.taehui.twilight.BundleIO.BundleVariety +import net.taehui.twilight.BundleIO.BundleVariety.Companion.getBundleVariety +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.system.* +import org.apache.commons.codec.binary.Hex +import org.apache.commons.compress.compressors.xz.XZCompressorOutputStream +import org.apache.commons.io.FilenameUtils +import org.apache.commons.io.IOUtils +import org.apache.commons.lang3.RandomStringUtils +import org.slf4j.LoggerFactory +import java.net.InetAddress +import java.net.InetSocketAddress +import java.nio.channels.AsynchronousFileChannel +import java.nio.channels.CompletionHandler +import java.nio.file.Files +import java.nio.file.Path +import java.nio.file.StandardOpenOption +import java.security.MessageDigest +import java.time.LocalDateTime +import java.util.* +import java.util.concurrent.ConcurrentHashMap +import kotlin.io.path.nameWithoutExtension + +class QwilightAvatar : SimpleChannelInboundHandler(), Avatar { + override val availableCSX = Any() + override val siteYellMillis = LinkedList() + override var lastSignInDate: LocalDateTime = LocalDateTime.MIN + override lateinit var handler: ChannelHandlerContext + override var isAwilight = false + override var isAvailable = true + private val savingDefaultNoteIDs = mutableListOf() + private val savingDefaultUIIDs = mutableListOf() + private val defaultNoteSaveStore = LinkedList() + private val defaultUISaveStore = LinkedList() + override lateinit var avatarIP: InetAddress + override var avatarEstimatedID = "" + private val savingAsBundleIOs = ConcurrentHashMap() + private val savingBundleIOs = ConcurrentHashMap() + override var isEstablished = false + override var isSignedIn = false + override var isValve = false + override var qwilightHash = "" + override var qwilightDate = "" + override var language = "ko-KR" + override var qwilightID = "" + override var qwilightName = "" + override var avatarID = "" + override var avatarName = "" + override var avatarCompetence = 1 + override var situationValue = NOTE_FILE_MODE + override var situationText = "" + override val isEnterQuitAware = true + override val avatarNameTitle = "" + + override fun send(eventID: EventClass.Event.EventID, text: Any?, vararg data: ByteString?): ChannelFuture { + return handler.writeAndFlush(EventClass.Event.newBuilder().apply { + this.eventID = eventID + if (text != null) { + this.text = if (text is String) text else ObjectMapper().writeValueAsString(text) + } + this.addAllData(data.toList()) + }.build()) + } + + override fun send(event: EventClass.Event) { + handler.writeAndFlush(event) + } + + private fun hasAvailableCount(): Boolean { + return savingBundleIOs.size + savingAsBundleIOs.size < BUNDLE_AVAILABLE_COUNT + } + + private fun doCallBundle(targetAvatarID: String, isWindowOpen: Boolean) { + DB.getBundles( + Utility.getDefaultAvatarID(targetAvatarID) + ).thenAccept { bundles -> + if (bundles != null) { + send(EventClass.Event.EventID.CALL_BUNDLE, object { + val targetAvatar = targetAvatarID + val targetValue = bundles.second + val bundleLength = 5000000000 + + @JvmField + val isWindowOpen = isWindowOpen + val data = bundles.first.map { + object { + val date = it[0] as Long + val bundleName = it[1] as String + val bundleLength = it[2] as Long + val bundleCompetence = it[3] as Int + val bundleVariety = it[4] as Int + } + } + }) + } + } + } + + private fun translateTitleItem(target: TitleSystem.TitleItem): String { + return when (language) { + "ko-KR" -> target.title1042 + else -> target.title + } + } + + override fun toString(): String { + return if (isEstablished) { + when (situationValue) { + NOTE_FILE_MODE -> "[$loggerID] Note File Mode ($situationText)" + DEFAULT_COMPUTING -> "[$loggerID] Default Computing ($situationText)" + COMMENT_COMPUTING -> "[$loggerID] Comment Computing ($situationText)" + AUTO_COMPUTING -> "[$loggerID] Auto Computing ($situationText)" + QUIT_MODE -> "[$loggerID] Quit Computing ($situationText)" + NET_COMPUTING -> "[$loggerID] Net Computing ($situationText)" + IO_COMPUTING -> "[$loggerID] IO Computing ($situationText)" + else -> "[$loggerID] Idle" + } + } else "[$loggerID] Not Established" + } + + override fun channelActive(ctx: ChannelHandlerContext) { + handler = ctx + avatarIP = (handler.channel().remoteAddress() as InetSocketAddress).address + isAwilight = avatarIP.isLoopbackAddress + avatarEstimatedID = History.getAvatarID(remote) + } + + override fun channelInactive(ctx: ChannelHandlerContext) { + AvatarHandler.quitAvatar(avatarID) + } + + public override fun channelRead0(ctx: ChannelHandlerContext, msg: EventClass.Event) { + doIfValid(msg) { + doIfAvailable { + val jm = ObjectMapper() + val eventText = msg.text + val eventData = msg.dataList + + fun saveDefaultNote(eventText: String) { + val text = if (eventText.isEmpty()) null else jm.readValue(eventText, Array::class.java) + if (text != null) { + if (defaultNoteSaveStore.isEmpty()) { + Files.list(TwilightComponent.DEFAULT_NOTE_ENTRY).use { defaultNoteFilePaths -> + defaultNoteSaveStore.addAll(defaultNoteFilePaths.filter { defaultNoteFilePath -> + FilenameUtils.isExtension( + defaultNoteFilePath.fileName.toString(), + "zip" + ) + }.map { defaultNoteFilePath -> + defaultNoteFilePath.nameWithoutExtension + }.toList().subtract(text.toList().toSet())) + } + } else { + send(EventClass.Event.EventID.ALREADY_LOADING_BUNDLE, null) + return + } + } + val saveBundleID = UUID.randomUUID().toString() + savingDefaultNoteIDs.add(saveBundleID) + defaultNoteSaveStore.poll().let { + if (it != null) { + val bundleFileName = "$it.zip" + val bundleFilePath = Path.of("Default", "Note", bundleFileName) + val fileChannel = AsynchronousFileChannel.open(bundleFilePath) + savingBundleIOs[saveBundleID] = BundleIO( + bundleFilePath, + fileChannel, + it, + BundleVariety.DEFAULT_NOTE, + "", + bundleFileName, + false + ) + send( + EventClass.Event.EventID.SAVE_BUNDLE, + object { + val bundleID = saveBundleID + val bundleVariety = BundleVariety.DEFAULT_NOTE.value + val bundleLength = fileChannel.size() + } + ) + } else { + send( + EventClass.Event.EventID.NOTIFY_INFO, + translateLanguage("savedDefaultNote") + ) + } + } + } + + fun saveDefaultUI(eventText: String) { + val defaultUISaveStore = defaultUISaveStore + if (eventText.toBoolean()) { + if (defaultUISaveStore.isEmpty()) { + Files.list(TwilightComponent.DEFAULT_UI_ENTRY).use { defaultUIFilePaths -> + defaultUISaveStore.addAll(defaultUIFilePaths.filter { defaultUIFilePath -> + FilenameUtils.isExtension( + defaultUIFilePath.fileName.toString(), + "zip" + ) + }.toList()) + } + } else { + send(EventClass.Event.EventID.ALREADY_LOADING_BUNDLE, null) + return + } + } + val saveBundleID = UUID.randomUUID().toString() + savingDefaultUIIDs.add(saveBundleID) + defaultUISaveStore.poll().let { + if (it != null) { + val bundleFileName = it.fileName.toString() + val targetDefaultUI = FilenameUtils.removeExtension(bundleFileName) + val saveDefaultUIChannel = AsynchronousFileChannel.open(it) + savingBundleIOs[saveBundleID] = BundleIO( + it, + saveDefaultUIChannel, + targetDefaultUI, + BundleVariety.DEFAULT_UI, + "", + bundleFileName, + false + ) + send( + EventClass.Event.EventID.SAVE_BUNDLE, + object { + val bundleID = saveBundleID + val bundleVariety = BundleVariety.DEFAULT_UI.value + val bundleLength = saveDefaultUIChannel.size() + } + ) + } else { + send( + EventClass.Event.EventID.NOTIFY_INFO, + translateLanguage("savedDefaultUI") + ) + } + } + } + + if (!isAwilight) { + logEvent(msg) + } + + when (msg.eventID) { + EventClass.Event.EventID.ESTABLISH -> wantNotEstablished { + val text = jm.readValue(eventText, JSON.QwilightEstablish::class.java) + language = text.language + val isValve = eventData.size > 0 + Configure.establish(this, text.hash, text.date, isValve) { + val avatarID = "*" + RandomStringUtils.randomAlphanumeric(19) + if (isValve) { + ValveSystem.putDrawing(avatarID, eventData[0]) + } + AvatarHandler.establish(this, avatarID, text.qwilightName, isValve, it) + } + } + + EventClass.Event.EventID.SIGN_IN -> wantNotSignedIn { + if (allowSignIn()) { + trySignInDate() + val text = jm.readValue(eventText, JSON.QwilightSignIn::class.java) + Configure.signIn( + this, + text.avatarID, + text.avatarCipher + ).thenAccept { + if (it != null) { + val avatarCompetence = it[3] as Int + if (avatarCompetence >= 1) { + val avatarID = it[1] as String + val avatarName = it[2] as String + AvatarHandler.handleSignIn( + this, + it[0] as String, + avatarID, + avatarName, + avatarCompetence + ) + History.putHistory(this, avatarID) + DB.getNotifyUbuntu(avatarID) + .forEach { ubuntuID -> + AvatarHandler.getAvatar( + ubuntuID + )?.let { ubuntu -> + if (DB.isCrossUbuntu(avatarID, ubuntuID)) { + ubuntu.send( + EventClass.Event.EventID.NOTIFY_INFO, + String.format( + ubuntu.translateLanguage("ubuntuNotify"), + avatarName + ) + ) + } + } + } + } else { + send( + EventClass.Event.EventID.NOTIFY_INFO, + translateLanguage("unavailableAvatar") + ) + } + } + } + } + } + + EventClass.Event.EventID.NOT_SIGN_IN -> wantSignedIn { + AvatarHandler.handleNotSignIn( + it + ) + } + + EventClass.Event.EventID.CALL_UBUNTU -> wantSignedIn { avatarID -> + DB.getUbuntu(avatarID).thenAccept { ubuntu -> + send( + EventClass.Event.EventID.CALL_UBUNTU, + ubuntu.stream().map { + val ubuntuID = it[0] + val situationValue: Int + val situationText: String + if (DB.isCrossUbuntu(avatarID, ubuntuID)) { + val avatarUbuntu = + AvatarHandler.getAvatar(ubuntuID) + situationValue = avatarUbuntu?.situationValue ?: NOT_SIGNED_IN + situationText = + avatarUbuntu?.situationText ?: DB.getLastDate(ubuntuID).toString() + } else { + situationValue = NOT_UBUNTU + situationText = "" + } + object { + val ubuntuID = ubuntuID + val ubuntuName = it[1] + val situationValue = situationValue + val situationText = situationText + } + }.toArray() + ) + } + } + + EventClass.Event.EventID.ENTER_SITE -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightEnterSite::class.java) + SiteHandler.enterSite(UUID.fromString(text.siteID), this, text.siteCipher) + } + + EventClass.Event.EventID.SITE_YELL -> wantEstablished { + SiteHandler.putSiteYell( + this, + jm.readValue(eventText, JSON.QwilightSiteYell::class.java) + ) + } + + EventClass.Event.EventID.GET_SITE_YELLS -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightGetSiteYells::class.java) + SiteHandler.getSiteYells(UUID.fromString(text.siteID), this, text) + } + + EventClass.Event.EventID.SAVE_AS_BUNDLE -> wantEstablished { avatarID -> + val text = jm.readValue(eventText, JSON.QwilightSaveAsBundle::class.java) + val bundleVariety = text.bundleVariety + val bundleName = text.bundleName + val etc = text.etc + + fun saveAsBundle(bundleEntryPath: Path, saveAsBundleName: String, saveAsBundleID: String) { + if (hasAvailableCount()) { + if (!Files.isDirectory(bundleEntryPath)) { + Files.createDirectories(bundleEntryPath) + } + val bundleFilePath = bundleEntryPath.resolve("$saveAsBundleName.tmp") + savingAsBundleIOs[saveAsBundleID] = BundleIO( + bundleFilePath, + AsynchronousFileChannel.open( + bundleFilePath, + StandardOpenOption.CREATE, + StandardOpenOption.WRITE + ), + saveAsBundleName, + getBundleVariety(bundleVariety), + etc, + FilenameUtils.getName(text.bundleEntryPath) + getBundleVariety( + bundleVariety + ).fileVariety, + true + ) + send( + EventClass.Event.EventID.SAVE_AS_BUNDLE, + object { + val bundleID = saveAsBundleID + val bundleVariety = bundleVariety + val bundleName = bundleName + val bundleEntryPath = text.bundleEntryPath + } + ) + } else { + send(EventClass.Event.EventID.ALREADY_LOADING_BUNDLE, null) + } + } + + if (getBundleVariety(bundleVariety) == BundleVariety.NET) { + if (SiteHandler.isNetSiteHand(this, UUID.fromString(etc))) { + saveAsBundle(TwilightComponent.BUNDLE_ENTRY_PATH, etc, etc) + } + } else { + val saveAsBundleName = + bundleName.ifEmpty { UUID.randomUUID().toString() } + DB.hasBundleBefore( + avatarID, + saveAsBundleName + ).thenAccept { + if (it) { + send( + EventClass.Event.EventID.WARNING, + translateLanguage("alreadyBundle") + ) + } else { + saveAsBundle( + TwilightComponent.BUNDLE_ENTRY_PATH.resolve(avatarID), + saveAsBundleName, + UUID.randomUUID().toString() + ) + } + } + } + } + + EventClass.Event.EventID.SAVING_AS_BUNDLE -> wantEstablished { + val savingAsBundleIOs = savingAsBundleIOs + savingAsBundleIOs[eventText]?.let { + val savingAsBundleData = eventData[0].asReadOnlyByteBuffer() + it.fileChannel.write( + savingAsBundleData, + it.filePosition.toLong(), + it, + object : CompletionHandler { + override fun completed(result: Int, attachment: BundleIO) = Unit + + override fun failed(exc: Throwable, attachment: BundleIO) { + savingAsBundleIOs.remove(eventText)?.use { + logFault(exc) + } + } + }) + it.saveFilePosition(savingAsBundleData.capacity()) + } + } + + EventClass.Event.EventID.STOP_SAVING_AS_BUNDLE -> wantEstablished { + savingAsBundleIOs.remove(eventText)?.close() + } + + EventClass.Event.EventID.SAVED_AS_BUNDLE -> wantEstablished { avatarID -> + savingAsBundleIOs.remove(eventText)?.let { bundleIO -> + bundleIO.fileChannel.write( + eventData[0].asReadOnlyByteBuffer(), + bundleIO.filePosition.toLong(), + bundleIO, + object : CompletionHandler { + override fun completed(result: Int, attachment: BundleIO) { + attachment.use { + val etc = it.etc + val bundleName = it.bundleName + val bundleVariety = it.bundleVariety + if (bundleVariety == BundleVariety.NET) { + it.setFileVariety() + send(EventClass.Event.EventID.SAVED_AS_BUNDLE, eventText) + val bundleFileName = it.bundleFileName + SiteHandler.putSiteYell( + this@QwilightAvatar, + JSON.QwilightSiteYell().apply { + siteID = etc + siteYell = String.format( + translateLanguage("savedAsNetBundle"), + bundleFileName + ) + } + ) + SiteHandler.setNetBundle( + UUID.fromString(etc), + bundleFileName + ) + } else { + val bundleLength = it.getBundleLength() + if (DB.isBundleLengthAvailable( + avatarID, + bundleLength + ) + ) { + it.setFileVariety() + DB.saveBundle( + avatarID, + bundleName, + bundleLength, + it.bundleVariety, + etc + ) + send( + EventClass.Event.EventID.SAVED_AS_BUNDLE, + eventText + ) + doCallBundle(avatarID, false) + } else { + send( + EventClass.Event.EventID.WARNING, + translateLanguage("hasNotLength") + ) + } + } + } + } + + override fun failed(exc: Throwable, attachment: BundleIO) { + attachment.use { + logFault(exc) + } + } + }) + } + } + + EventClass.Event.EventID.SAVE_BUNDLE -> wantEstablished { avatarID -> + val text = jm.readValue(eventText, JSON.QwilightSaveBundle::class.java) + val etc = text.etc + if (hasAvailableCount()) { + if (Utility.isEtcNetBundle(etc)) { + val bundleFileName = etc + BundleVariety.NET.fileVariety + val bundleFilePath = TwilightComponent.BUNDLE_ENTRY_PATH.resolve(bundleFileName) + val fileChannel = AsynchronousFileChannel.open(bundleFilePath) + savingBundleIOs[etc] = BundleIO( + bundleFilePath, + fileChannel, + text.bundleName, + BundleVariety.NET, + etc, + bundleFileName, + false + ) + send( + EventClass.Event.EventID.SAVE_BUNDLE, + object { + val bundleID = etc + val bundleVariety = BundleVariety.NET.value + val bundleLength = fileChannel.size() + } + ) + } else { + val targetAvatarID = Utility.getDefaultAvatarID(text.avatarID) + DB.getBundle( + targetAvatarID, + text.bundleName + ).thenAccept { bundle -> + if (bundle != null) { + val bundleCompetence = bundle[0] as Int + val bundleVariety = bundle[1] as Int + val bundleEtc = bundle[2] as String + val bundleName = bundle[3] as String + if (isSU || Utility.getDefaultAvatarID(avatarID) == targetAvatarID || bundleCompetence == BUNDLE_CALLABLE || bundleCompetence == BUNDLE_AVATAR && isSignedIn || bundleCompetence == BUNDLE_UBUNTU && DB.isCrossUbuntu( + avatarID, + targetAvatarID + ) + ) { + val saveBundleID = UUID.randomUUID().toString() + val bundleFileName = + bundleName + getBundleVariety(bundleVariety).fileVariety + val bundleFilePath = + TwilightComponent.BUNDLE_ENTRY_PATH.resolve(targetAvatarID) + .resolve(bundleFileName) + val fileChannel = + AsynchronousFileChannel.open(bundleFilePath) + savingBundleIOs[saveBundleID] = BundleIO( + bundleFilePath, + fileChannel, + bundleName, + getBundleVariety(bundleVariety), + bundleEtc, + bundleFileName, + false + ) + send( + EventClass.Event.EventID.SAVE_BUNDLE, + object { + val bundleID = saveBundleID + val bundleVariety = bundleVariety + val bundleLength = fileChannel.size() + } + ) + val toNotifySaveBundle = + DB.getNotifySaveBundle(targetAvatarID) + if (toNotifySaveBundle == NOTIFY_SAVE_BUNDLE_CALLABLE || toNotifySaveBundle == NOTIFY_SAVE_BUNDLE_AVATAR && isSignedIn || toNotifySaveBundle == NOTIFY_SAVE_BUNDLE_UBUNTU && DB.isCrossUbuntu( + avatarID, + targetAvatarID + ) + ) { + AvatarHandler.getAvatar( + targetAvatarID + )?.let { + if (it !== this) { + it.send( + EventClass.Event.EventID.NOTIFY_INFO, + String.format( + it.translateLanguage("bundleNotify"), + avatarName, + bundleName + ) + ) + } + } + } + } else { + send( + EventClass.Event.EventID.WARNING, + translateLanguage("lowerCompetenceAsSave") + ) + } + } + } + } + } else { + send(EventClass.Event.EventID.ALREADY_LOADING_BUNDLE, null) + } + } + + EventClass.Event.EventID.SAVE_DEFAULT_NOTE -> wantEstablished { + saveDefaultNote(eventText) + } + + EventClass.Event.EventID.SAVE_DEFAULT_UI -> wantEstablished { + saveDefaultUI(eventText) + } + + EventClass.Event.EventID.SAVING_BUNDLE -> wantEstablished { + val savingBundleIOs = savingBundleIOs + savingBundleIOs[eventText]?.let { bundleIO -> + val savingBundleData = bundleIO.data + bundleIO.fileChannel.read( + savingBundleData, + bundleIO.filePosition.toLong(), + bundleIO, + object : CompletionHandler { + override fun completed(result: Int, attachment: BundleIO) { + attachment.saveFilePosition(result) + if (result == savingBundleData.capacity()) { + savingBundleIOs[eventText]?.let { + send( + EventClass.Event.EventID.SAVING_BUNDLE, + eventText, + ByteString.copyFrom(savingBundleData.flip()) + ).addListener { future -> + if (future.isSuccess) { + savingBundleData.flip() + it.fileChannel.read( + savingBundleData, + it.filePosition.toLong(), + attachment, + this + ) + } else { + failed(future.cause(), attachment) + } + } + } + } else { + savingBundleIOs[eventText]?.use { + send( + EventClass.Event.EventID.SAVED_BUNDLE, + object { + val bundleID = eventText + val bundleVariety = it.bundleVariety.value + val bundleName = it.bundleName + val etc = it.etc + }, + ByteString.copyFrom(savingBundleData.flip()) + ).addListener { future -> + if (future.isSuccess) { + savingBundleIOs.remove(eventText)?.close() + when (it.bundleVariety) { + BundleIO.BundleVariety.DEFAULT_NOTE -> saveDefaultNote("") + BundleIO.BundleVariety.DEFAULT_UI -> saveDefaultUI(false.toString()) + else -> Unit + } + } else { + failed(future.cause(), attachment) + } + } + } + } + } + + override fun failed(exc: Throwable, attachment: BundleIO) { + savingBundleIOs.remove(eventText)?.let { bundleIO -> + bundleIO.use { + logFault(exc) + } + } + } + }) + } + } + + EventClass.Event.EventID.STOP_SAVING_BUNDLE -> wantEstablished { + savingBundleIOs.remove(eventText)?.use { + if (savingDefaultNoteIDs.remove(eventText)) { + defaultNoteSaveStore.clear() + } + if (savingDefaultUIIDs.remove(eventText)) { + defaultUISaveStore.clear() + } + } + } + + EventClass.Event.EventID.NEW_UBUNTU -> wantSignedIn { + if (Utility.getDefaultAvatarID( + it + ) == eventText + ) { + send(EventClass.Event.EventID.WARNING, translateLanguage("ubuntuIsYou")) + } else { + DB.saveUbuntu(it, eventText).thenAccept { isOK -> + if (!isOK) { + send(EventClass.Event.EventID.WARNING, translateLanguage("alreadyUbuntu")) + } + } + } + } + + EventClass.Event.EventID.CALL_BUNDLE -> wantEstablished { + doCallBundle( + Utility.getDefaultAvatarID(eventText), true + ) + } + + EventClass.Event.EventID.CALL_CONFIGURE -> wantSignedIn { + DB.getConfigure(it).thenAccept { twilightConfigure -> + send( + EventClass.Event.EventID.CALL_CONFIGURE, + object { + val silentSiteCompetence = twilightConfigure[0] + val toNotifyUbuntuCompetence = twilightConfigure[1] + val defaultBundleCompetence = twilightConfigure[2] + val ioCompetence = twilightConfigure[3] + val toNotifySaveBundle = twilightConfigure[4] + } + ) + } + } + + EventClass.Event.EventID.WIPE_BUNDLE -> wantSignedIn { + DB.wipeBundle(it, eventText) + } + + EventClass.Event.EventID.WIPE_UBUNTU -> wantSignedIn { + DB.wipeUbuntu(it, eventText) + } + + EventClass.Event.EventID.SET_BUNDLE -> wantSignedIn { + DB.setBundle( + jm.readValue(eventText, JSON.QwilightSetBundle::class.java), + it + ) + } + + EventClass.Event.EventID.SET_CONFIGURE -> wantSignedIn { + DB.setConfigure( + jm.readValue(eventText, JSON.QwilightSetConfigure::class.java), + it + ) + } + + EventClass.Event.EventID.NEW_SITE -> wantEstablished { + doNewSite(jm.readValue(eventText, JSON.QwilightNewSite::class.java)) + } + + EventClass.Event.EventID.NEW_SILENT_SITE -> wantEstablished { + doNewSilentSite( + eventText + ) + } + + EventClass.Event.EventID.COMMENT -> wantSignedIn { + val text = jm.readValue(eventText, JSON.QwilightComment::class.java) + val dataID = text.dataID + val multiplier = text.multiplier + val autoMode = text.autoMode + val noteSaltMode = text.noteSaltMode + val audioMultiplier = text.audioMultiplier + val faintNoteMode = text.faintNoteMode + val judgmentMode = text.judgmentMode + val hitPointsMode = text.hitPointsMode + val noteMobilityMode = text.noteMobilityMode + val longNoteMode = text.longNoteMode + val inputFavorMode = text.inputFavorMode + val noteModifyMode = text.noteModifyMode + val lowestJudgmentConditionMode = text.lowestJudgmentConditionMode + val stand = text.stand + val band = text.highestBand + val point = text.point + val salt = text.salt + val isPaused = text.isPaused + val inputFlags = text.inputFlags + val commentFileContents = eventData[1] + if (longNoteMode != INPUT_LONG_NOTE_MODE && judgmentMode != FAVOR_JUDGMENT_MODE && hitPointsMode != FAVOR_HIT_POINTS_MODE && hitPointsMode != TEST_HIT_POINTS_MODE && noteModifyMode != LONG_NOTE_NOTE_MODIFY_MODE) { + val noteFileContents = eventData[0].toByteArray() + val hashComputer512 = MessageDigest.getInstance("SHA-512") + hashComputer512.update(noteFileContents) + val hashComputer128 = MessageDigest.getInstance("MD5") + hashComputer128.update(noteFileContents) + val hashComputer256 = MessageDigest.getInstance("SHA-256") + hashComputer256.update(noteFileContents) + val noteID512 = Hex.encodeHexString(hashComputer512.digest()) + val noteID128 = Hex.encodeHexString(hashComputer128.digest()) + val noteID256 = Hex.encodeHexString(hashComputer256.digest()) + val targetComputing = BaseCompiler.handleCompile(noteFileContents) + if (!targetComputing.isBanned && !BannedNote.isBanned(noteID512)) { + logFuture { + Files.write(TwilightComponent.NOTE_ENTRY_PATH.resolve(noteID512), noteFileContents) + DB.setNote( + "$noteID512:$dataID", + noteID128, + noteID256, + targetComputing + ) + hashComputer512.reset() + val inputMode = text.inputMode + val lastTitles = DB.getTitleItems(it) + val lastAvatarAbility = when (inputMode) { + Component.InputMode.INPUT_MODE_51 -> DB.getAvatarAbility5K(avatarID) + Component.InputMode.INPUT_MODE_71 -> DB.getAvatarAbility7K(avatarID) + Component.InputMode.INPUT_MODE_9 -> DB.getAvatarAbility9K(avatarID) + else -> 0.0 + } + val lastAvatarLevel = + DB.getAvatarLevels(it)[0] + val comment = + CommentClass.Comment.parseFrom(commentFileContents) + val commentFileData = commentFileContents.toByteArray() + val commentID = Hex.encodeHexString(hashComputer512.digest(commentFileData)) + if (DB.saveComment( + multiplier, + autoMode, + noteSaltMode, + audioMultiplier, + faintNoteMode, + judgmentMode, + hitPointsMode, + noteMobilityMode, + longNoteMode, + inputFavorMode, + noteModifyMode, + lowestJudgmentConditionMode, + stand, + band, + comment.lowestJudgment == 0, + point, + salt, + commentID, + it, + "$noteID512:$dataID", + isPaused, + inputFlags + ) + ) { + val commentFilePath = TwilightComponent.COMMENT_ENTRY_PATH.resolve(noteID512) + Files.createDirectories(commentFilePath) + commentFileData.inputStream().use { + XZCompressorOutputStream(Files.newOutputStream(commentFilePath.resolve("$commentID.xz"))).use { os -> + IOUtils.copy(it, os) + } + } + } + val titles = DB.getTitleItems(it) + val avatarAbility = when (inputMode) { + Component.InputMode.INPUT_MODE_51 -> DB.getAvatarAbility5K(avatarID) + Component.InputMode.INPUT_MODE_71 -> DB.getAvatarAbility7K(avatarID) + Component.InputMode.INPUT_MODE_9 -> DB.getAvatarAbility9K(avatarID) + else -> 0.0 + } + val avatarLevel = DB.getAvatarLevels(it)[0] + val distanceTitles = titles.filter { + !lastTitles.contains(it) + }.toList() + if (distanceTitles.isNotEmpty()) { + distanceTitles.forEach { + send( + EventClass.Event.EventID.NEW_TITLE, + translateTitleItem(it) + ) + } + } + val distanceAvatarAbility = avatarAbility - lastAvatarAbility + if (0.01 <= distanceAvatarAbility) { + send( + EventClass.Event.EventID.ABILITY_UP, String.format( + translateLanguage("abilityUp"), + distanceAvatarAbility + ) + ) + } else if (0 < distanceAvatarAbility) { + send( + EventClass.Event.EventID.ABILITY_UP, + translateLanguage("abilityUpMini") + ) + } + if (lastAvatarLevel < avatarLevel) { + send(EventClass.Event.EventID.LEVEL_UP, null) + } + val twilightCommentSiteYell = JSON.TwilightCommentSiteYell( + it, + avatarName, + targetComputing.artist, + targetComputing.title, + targetComputing.genre, + targetComputing.levelText, + targetComputing.level, + stand, + hitPointsMode + ) + if (SiteHandler.hasAvatar( + this, + SiteHandler.commentSiteID + ) + ) { + SiteHandler.putSiteYell( + SiteHandler.commentSiteID, + twilightCommentSiteYell + ) + } + } + } + } + } + + EventClass.Event.EventID.VALVE_COMMENT -> wantNotSignedIn { + val text = jm.readValue(eventText, JSON.QwilightValveComment::class.java) + val noteFileContents = eventData[0].toByteArray() + val hashComputer512 = MessageDigest.getInstance("SHA-512") + hashComputer512.update(noteFileContents) + val hashComputer128 = MessageDigest.getInstance("MD5") + hashComputer128.update(noteFileContents) + val hashComputer256 = MessageDigest.getInstance("SHA-256") + hashComputer256.update(noteFileContents) + val noteID512 = Hex.encodeHexString(hashComputer512.digest()) + val noteID128 = Hex.encodeHexString(hashComputer128.digest()) + val noteID256 = Hex.encodeHexString(hashComputer256.digest()) + val targetComputing = BaseCompiler.handleCompile(noteFileContents) + if (!targetComputing.isBanned) { + logFuture { + Files.write(TwilightComponent.NOTE_ENTRY_PATH.resolve(noteID512), noteFileContents) + DB.setNote( + "$noteID512:${text.dataID}", + noteID128, + noteID256, + targetComputing + ) + if (SiteHandler.hasAvatar( + this, + SiteHandler.commentSiteID + ) + ) { + SiteHandler.putSiteYell( + SiteHandler.commentSiteID, + JSON.TwilightCommentSiteYell( + avatarID, + avatarName, + targetComputing.artist, + targetComputing.title, + targetComputing.genre, + targetComputing.levelText, + targetComputing.level, + text.stand, + text.hitPointsMode + ) + ) + } + } + } + } + + EventClass.Event.EventID.QUIT_SITE -> wantEstablished { + SiteHandler.quitAvatar( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.SET_SITUATION -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetSituation::class.java) + this.situationValue = text.situationValue + this.situationText = text.situationText + } + + EventClass.Event.EventID.EXILE_AVATAR -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightExileAvatar::class.java) + AvatarHandler.getAvatar(text.avatarID)?.let { + SiteHandler.exileAvatar( + UUID.fromString( + text.siteID + ), this, it + ) + } + } + + EventClass.Event.EventID.LEVY_NET -> wantEstablished { + SiteHandler.setLevying( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.COMPILED -> wantEstablished { + SiteHandler.setCompiled( + this, + jm.readValue(eventText, JSON.QwilightCompiled::class.java) + ) + } + + EventClass.Event.EventID.CALL_NET -> wantEstablished { + SiteHandler.setNetData( + this, + msg.qwilightCallNet, + if (eventData.isEmpty()) null else CommentClass.Comment.parseFrom( + eventData[0] + ) + ) + } + + EventClass.Event.EventID.SET_MODE_COMPONENT -> wantEstablished { + SiteHandler.setModeComponent( + this, + jm.readValue(eventText, JSON.QwilightSetModeComponent::class.java) + ) + } + + EventClass.Event.EventID.SET_FAVOR_NOTE_FILE -> wantEstablished { + SiteHandler.setFavorNoteFile( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.SET_FAVOR_MODE_COMPONENT -> wantEstablished { + SiteHandler.setFavorModeComponent( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.SET_FAVOR_AUDIO_MULTIPLIER -> wantEstablished { + SiteHandler.setFavorAudioMultiplier( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.SET_AVATAR_GROUP -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetAvatarGroup::class.java) + SiteHandler.setAvatarGroup( + this, + UUID.fromString(text.siteID), + text + ) + } + + EventClass.Event.EventID.SET_AUTO_SITE_HAND -> wantEstablished { + SiteHandler.setAutoSiteHand( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.SET_VALID_HUNTER_MODE -> wantEstablished { + SiteHandler.setValidHunterMode( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.SET_VALID_NET_MODE -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetValidNetMode::class.java) + SiteHandler.setValidNetMode( + this, + UUID.fromString(text.siteID), + text + ) + } + + EventClass.Event.EventID.SET_ALLOWED_POSTABLE_ITEMS -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetAllowedPostableItems::class.java) + SiteHandler.setAllowedPostableItems( + this, + UUID.fromString(text.siteID), + text + ) + } + + EventClass.Event.EventID.CALL_NET_SITE_COMMENTS -> wantEstablished { + SiteHandler.doCallNetSiteComments( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.SET_NOTE_FILE -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetNoteFile::class.java) + SiteHandler.setNoteFileContents(this, UUID.fromString(text.siteID), text) + } + + EventClass.Event.EventID.SET_SITE_HAND -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetSiteHand::class.java) + AvatarHandler.getAvatar(text.avatarID)?.let { + SiteHandler.setSiteHand( + this, + UUID.fromString(text.siteID), + it + ) + } + } + + EventClass.Event.EventID.SET_SITE_NAME -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetSiteName::class.java) + setSiteName(text.siteID, text.siteName) + } + + EventClass.Event.EventID.POST_FILE -> wantEstablished { + logFuture { + val tmpPath = Configure.path.tmpPath.resolve( + RandomStringUtils.randomAlphanumeric(8) + "." + eventText + ) + Files.write(Configure.path.wwwPath.resolve(tmpPath), eventData[0].toByteArray()) + send( + EventClass.Event.EventID.POST_FILE, "${Configure.www.remote}/${ + tmpPath.toString().replace(" ".toRegex(), "%20") + }" + ) + } + } + + EventClass.Event.EventID.WWW_LEVEL -> wantSignedIn { avatarID -> + val text = jm.readValue(eventText, JSON.QwilightWwwLevel::class.java) + DB.getClearedLevelIDs(avatarID).thenAccept { + val levelItems = LevelSystem.getSatisfiedLevelItems(text) + levelItems.filter { levelItem -> + !it.contains( + levelItem.levelID + ) + } + .forEach { levelItem -> + val lastTitles = DB.getTitleItems(avatarID) + DB.setWwwLevel(avatarID, levelItem.levelID) + val titles = DB.getTitleItems(avatarID) + val distanceTitles = titles.filter { + !lastTitles.contains(it) + }.toList() + if (distanceTitles.isNotEmpty()) { + distanceTitles.forEach { + send( + EventClass.Event.EventID.NEW_TITLE, + translateTitleItem(it) + ) + } + } + send(EventClass.Event.EventID.WWW_LEVEL, levelItem.title) + } + } + } + + EventClass.Event.EventID.CALL_IO -> wantEstablished { avatarID -> + val text = jm.readValue(eventText, JSON.QwilightCallIO::class.java) + val targetAvatarID = Utility.getDefaultAvatarID(text.avatarID) + if (Utility.getDefaultAvatarID(avatarID) == targetAvatarID) { + send(EventClass.Event.EventID.WARNING, translateLanguage("ioAvatarIsYou")) + } else { + AvatarHandler.getAvatar(text.avatarID)?.let { ioAvatar -> + DB.getIOCompetence( + targetAvatarID + ).thenAccept { + if (it == IO_CALLABLE || it == IO_AVATAR && isSignedIn || it == IO_UBUNTU && DB.isCrossUbuntu( + avatarID, + targetAvatarID + ) + ) { + ioAvatar.send( + EventClass.Event.EventID.CALL_IO, + object { + val handlerID = text.handlerID + val avatarID = avatarID + val ioMillis = text.ioMillis + } + ) + } else { + send( + EventClass.Event.EventID.WARNING, + translateLanguage("lowerCompetenceAsIO") + ) + } + } + } + } + } + + EventClass.Event.EventID.IO_NOT -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightIONot::class.java) + AvatarHandler.getAvatar(text.avatarID)?.send( + EventClass.Event.EventID.IO_NOT, + text.handlerID + ) + } + + EventClass.Event.EventID.CALL_IO_COMPONENT -> wantEstablished { avatarID -> + val text = jm.readValue(eventText, JSON.QwilightCallIOComponent::class.java) + AvatarHandler.getAvatar(text.avatarID)?.send( + EventClass.Event.EventID.CALL_IO_COMPONENT, + object { + val avatarID = avatarID + val avatarName = this@QwilightAvatar.avatarName + val noteID = text.noteID + val handlerID = text.handlerID + + @JvmField + val isFailMode = text.isFailMode + val data = text.data + val ioHandlerID = text.ioHandlerID + val ioMillis = text.ioMillis + val targetIOMillis = text.targetIOMillis + } + ) + } + + EventClass.Event.EventID.COMPILED_IO -> wantEstablished { avatarID -> + val text = jm.readValue(eventText, JSON.QwilightCompiledIO::class.java) + AvatarHandler.getAvatar(text.avatarID)?.send( + EventClass.Event.EventID.COMPILED_IO, + object { + val handlerID = text.handlerID + + @JvmField + val isCompiled = text.isCompiled + val avatarID = avatarID + val avatarName = this@QwilightAvatar.avatarName + } + ) + } + + EventClass.Event.EventID.LEVY_IO -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightLevyIO::class.java) + text.avatarIDs.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.EventID.LEVY_IO, + object { + val handlerID = text.handlerID + val levyingWait = text.levyingWait + val lastStand = text.lastStand + + @JvmField + val isF = text.isF + val multiplier = text.multiplier + val audioMultiplier = text.audioMultiplier + val ioMillis = text.ioMillis + }, + eventData[0] + ) + } + } + + EventClass.Event.EventID.IO_INPUT -> wantEstablished { + val qwilightIOInput = msg.qwilightIOInput + qwilightIOInput.avatarIDsList.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_INPUT + twilightIOInput = EventClass.Event.TwilightIOInput.newBuilder().apply { + handlerID = qwilightIOInput.handlerID + input = qwilightIOInput.input + this.power = qwilightIOInput.power + }.build() + }.build() + ) + } + } + + EventClass.Event.EventID.IO_JUDGE -> wantEstablished { + val qwilightIOJudge = msg.qwilightIOJudge + qwilightIOJudge.avatarIDsList.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_JUDGE + twilightIOJudge = EventClass.Event.TwilightIOJudge.newBuilder().apply { + handlerID = qwilightIOJudge.handlerID + noteID = qwilightIOJudge.noteID + this.judged = qwilightIOJudge.judged + }.build() + }.build() + ) + } + } + + EventClass.Event.EventID.IO_NOTE_VISIBILITY -> wantEstablished { + val qwilightIONoteVisibility = msg.qwilightIONoteVisibility + qwilightIONoteVisibility.avatarIDsList.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_NOTE_VISIBILITY + twilightIONoteVisibility = + EventClass.Event.TwilightIONoteVisibility.newBuilder().apply { + handlerID = qwilightIONoteVisibility.handlerID + noteID = qwilightIONoteVisibility.noteID + setValidJudgedNotes = qwilightIONoteVisibility.setValidJudgedNotes + setNoteFailed = qwilightIONoteVisibility.setNoteFailed + }.build() + }.build() + ) + } + } + + EventClass.Event.EventID.IO_JUDGMENT_METER -> wantEstablished { + val qwilightIOJudgmentMeter = msg.qwilightIOJudgmentMeter + qwilightIOJudgmentMeter.avatarIDsList.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_JUDGMENT_METER + twilightIOJudgmentMeter = + EventClass.Event.TwilightIOJudgmentMeter.newBuilder().apply { + handlerID = qwilightIOJudgmentMeter.handlerID + input = qwilightIOJudgmentMeter.input + judgmentMeter = qwilightIOJudgmentMeter.judgmentMeter + assist = qwilightIOJudgmentMeter.assist + }.build() + }.build() + ) + } + } + + EventClass.Event.EventID.IO_MULTIPLIER -> wantEstablished { + val qwilightIOMultiplier = msg.qwilightIOMultiplier + qwilightIOMultiplier.avatarIDsList.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_MULTIPLIER + twilightIOMultiplier = EventClass.Event.TwilightIOMultiplier.newBuilder().apply { + handlerID = qwilightIOMultiplier.handlerID + multiplier = qwilightIOMultiplier.multiplier + }.build() + }.build() + ) + } + } + + EventClass.Event.EventID.IO_AUDIO_MULTIPLIER -> wantEstablished { + val qwilightIOAudioMultiplier = msg.qwilightIOAudioMultiplier + qwilightIOAudioMultiplier.avatarIDsList.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.newBuilder().apply { + eventID = EventClass.Event.EventID.IO_AUDIO_MULTIPLIER + twilightIOAudioMultiplier = + EventClass.Event.TwilightIOAudioMultiplier.newBuilder().apply { + handlerID = qwilightIOAudioMultiplier.handlerID + audioMultiplier = qwilightIOAudioMultiplier.audioMultiplier + }.build() + }.build() + ) + } + } + + EventClass.Event.EventID.IO_PAUSE -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightIOPause::class.java) + text.avatarIDs.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.EventID.IO_PAUSE, + object { + val handlerID = text.handlerID + + @JvmField + val isPaused = text.isPaused + } + ) + } + } + + EventClass.Event.EventID.IO_QUIT -> wantEstablished { avatarID -> + val text = jm.readValue(eventText, JSON.QwilightIOQuit::class.java) + text.avatarIDs.forEach { + AvatarHandler.getAvatar(it)?.send( + EventClass.Event.EventID.IO_QUIT, + object { + val avatarID = (if (text.isBanned) "" else avatarID) + val handlerID = text.handlerID + } + ) + } + } + + EventClass.Event.EventID.AUDIO_INPUT -> wantEstablished { + SiteHandler.audioInput( + UUID.fromString(eventText), + this, + eventData[0] + ) + } + + EventClass.Event.EventID.QUIT_NET -> wantEstablished { + SiteHandler.stopSiteNet( + this, + UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.COMMENTARY -> wantSignedIn { + val text = jm.readValue(eventText, JSON.QwilightCommentary::class.java) + DB.setCommentary(text.noteID, it, text.commentary).thenAccept { isOK -> + if (!isOK) { + send(EventClass.Event.EventID.WARNING, translateLanguage("hasNotComment")) + } + } + } + + EventClass.Event.EventID.AVATAR_TITLE -> wantSignedIn { + DB.setAvatarTitle(it, eventText).thenRun { + AvatarHandler.sendInvalidateAvatarTitle( + it + ) + } + } + + EventClass.Event.EventID.AVATAR_EDGE -> wantSignedIn { + DB.setAvatarEdge(it, eventText).thenRun { + AvatarHandler.sendInvalidateAvatarEdge( + it + ) + } + } + + EventClass.Event.EventID.SET_LANGUAGE -> wantEstablished { + language = eventText + } + + EventClass.Event.EventID.SET_FAVOR -> wantSignedIn { + DB.setFavor(jm.readValue(eventText, JSON.QwilightSetFavor::class.java), avatarID) + } + + EventClass.Event.EventID.POST_ITEM -> wantEstablished { + val qwilightPostItem = msg.qwilightPostItem + SiteHandler.postItem( + UUID.fromString(qwilightPostItem.siteID), + this, + qwilightPostItem + ) + } + + else -> Unit + } + } + } + } + + override val loggerID: String + get() = if (isEstablished) { + if (isSignedIn) { + "{ID: $avatarID, Name: $avatarName, IP: $remote, Date: v$qwilightDate (${ + qwilightHash.substring( + 0, + 8 + ) + })}" + } else { + if (isAwilight) { + "{ID: $avatarID, Name: $avatarName}" + } else if (avatarEstimatedID.isNotEmpty()) { + "{ID: $avatarID ($avatarEstimatedID?), Name: $avatarName, IP: $remote, Date: v$qwilightDate (${ + qwilightHash.substring( + 0, + 8 + ) + })}" + } else { + "{ID: $avatarID, Name: $avatarName, IP: $remote, Date: v$qwilightDate (${ + qwilightHash.substring( + 0, + 8 + ) + })}" + } + } + } else { + if (qwilightDate.isEmpty() || qwilightHash.isEmpty()) { + "{IP: $remote}}" + } else { + "{IP: $remote}, Date: v$qwilightDate (${qwilightHash.substring(0, 8)})}" + } + } + + override fun exceptionCaught(ctx: ChannelHandlerContext, cause: Throwable) { + logFault(cause) + } + + override fun logInfo(toNotify: String) { + LoggerFactory.getLogger(javaClass).info("[{}] {}", loggerID, toNotify) + } + + override fun logFault(e: Throwable) { + if (Utility.isValidFault(e)) { + LoggerFactory.getLogger(javaClass).error("[{}] {}", loggerID, Utility.getFault(e)) + } + } + + companion object { + const val NOT_UBUNTU = 0 + const val NOT_SIGNED_IN = 1 + const val NOTIFY_UBUNTU = 0 + const val NOTIFY_SAVE_BUNDLE_CALLABLE = 0 + const val NOTIFY_SAVE_BUNDLE_AVATAR = 1 + const val NOTIFY_SAVE_BUNDLE_UBUNTU = 2 + const val IO_CALLABLE = 0 + const val IO_AVATAR = 3 + const val IO_UBUNTU = 1 + const val BUNDLE_CALLABLE = 0 + const val BUNDLE_AVATAR = 3 + const val BUNDLE_UBUNTU = 1 + const val BUNDLE_VOID = 2 + const val SILENT_SITE_CALLABLE = 0 + const val SILENT_SITE_AVATAR = 3 + const val SILENT_SITE_UBUNTU = 1 + const val NOTE_FILE_MODE = 2 + const val DEFAULT_COMPUTING = 3 + const val COMMENT_COMPUTING = 4 + const val AUTO_COMPUTING = 5 + const val QUIT_MODE = 6 + const val NET_COMPUTING = 7 + const val IO_COMPUTING = 8 + const val BUNDLE_AVAILABLE_COUNT = 1 + const val INPUT_LONG_NOTE_MODE = 2 + const val FAVOR_JUDGMENT_MODE = 5 + const val FAVOR_HIT_POINTS_MODE = 6 + const val TEST_HIT_POINTS_MODE = 7 + const val LONG_NOTE_NOTE_MODIFY_MODE = 2 + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/qwilight/QwilightBoot.kt b/src/main/kotlin/net/taehui/twilight/qwilight/QwilightBoot.kt new file mode 100644 index 0000000..11719fa --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/qwilight/QwilightBoot.kt @@ -0,0 +1,46 @@ +package net.taehui.twilight.qwilight + +import io.netty.bootstrap.ServerBootstrap +import io.netty.channel.ChannelInitializer +import io.netty.channel.EventLoopGroup +import io.netty.channel.socket.ServerSocketChannel +import io.netty.channel.socket.SocketChannel +import io.netty.handler.codec.protobuf.ProtobufDecoder +import io.netty.handler.codec.protobuf.ProtobufEncoder +import io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder +import io.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender +import io.netty.handler.ssl.SslHandler +import net.taehui.EventClass +import net.taehui.twilight.Logger +import javax.net.ssl.SSLContext + +class QwilightBoot( + eventLoopGroup: EventLoopGroup, + eventChannel: Class, + sslContext: SSLContext +) : Logger, Runnable { + private val mainBootstrap: ServerBootstrap + + init { + mainBootstrap = ServerBootstrap().group(eventLoopGroup).channel(eventChannel) + .childHandler(object : ChannelInitializer() { + public override fun initChannel(ch: SocketChannel) { + ch.pipeline() + .addLast(SslHandler(sslContext.createSSLEngine().apply { + useClientMode = false + })) + .addLast(ProtobufVarint32FrameDecoder()) + .addLast(ProtobufDecoder(EventClass.Event.getDefaultInstance())) + .addLast(ProtobufVarint32LengthFieldPrepender()) + .addLast(ProtobufEncoder()) + .addLast(QwilightAvatar()) + } + }) + } + + override fun run() { + logInfo("Loading Qwilight") + mainBootstrap.bind(6101).channel().closeFuture() + .addListener { logInfo("Closed Qwilight") } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/site/SiteAvatar.kt b/src/main/kotlin/net/taehui/twilight/site/SiteAvatar.kt new file mode 100644 index 0000000..195d297 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/site/SiteAvatar.kt @@ -0,0 +1,264 @@ +package net.taehui.twilight.site + +import com.fasterxml.jackson.core.JsonProcessingException +import com.fasterxml.jackson.databind.ObjectMapper +import com.google.protobuf.ByteString +import io.netty.buffer.ByteBuf +import io.netty.buffer.Unpooled +import io.netty.channel.ChannelFuture +import io.netty.channel.ChannelHandlerContext +import io.netty.channel.SimpleChannelInboundHandler +import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame +import io.netty.handler.codec.http.websocketx.WebSocketFrame +import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler.HandshakeComplete +import net.taehui.EventClass +import net.taehui.twilight.Avatar +import net.taehui.twilight.JSON +import net.taehui.twilight.Utility +import net.taehui.twilight.qwilight.QwilightAvatar +import net.taehui.twilight.system.AvatarHandler +import net.taehui.twilight.system.Configure +import net.taehui.twilight.system.History +import net.taehui.twilight.system.SiteHandler +import org.apache.commons.lang3.RandomStringUtils +import org.slf4j.LoggerFactory +import java.net.InetAddress +import java.net.InetSocketAddress +import java.net.UnknownHostException +import java.nio.file.Files +import java.time.LocalDateTime +import java.util.* + + +class SiteAvatar : SimpleChannelInboundHandler(), Avatar { + override val availableCSX = Any() + override val siteYellMillis = LinkedList() + override var lastSignInDate: LocalDateTime = LocalDateTime.MIN + override lateinit var handler: ChannelHandlerContext + override var isAwilight = false + override var isAvailable = true + override lateinit var avatarIP: InetAddress + override var isEstablished = false + override var isSignedIn = false + override var isValve = false + override var qwilightHash = "" + override var qwilightDate = "" + override var language = "ko-KR" + override var qwilightID = "" + override var qwilightName = "" + override var avatarID = "" + override var avatarName = "" + override var avatarEstimatedID = "" + override var avatarCompetence = 1 + override var situationValue = QwilightAvatar.NOTE_FILE_MODE + override var situationText = "" + private val fragments = mutableListOf() + override val isEnterQuitAware = false + override val avatarNameTitle = "🌐 " + + override fun send(eventID: EventClass.Event.EventID, text: Any?, vararg data: ByteString?): ChannelFuture { + return handler.writeAndFlush(BinaryWebSocketFrame(Unpooled.wrappedBuffer(EventClass.Event.newBuilder().apply { + this.eventID = eventID + if (text != null) { + this.text = if (text is String) text else ObjectMapper().writeValueAsString(text) + } + this.addAllData(data.toList()) + }.build().toByteArray()))) + } + + override fun send(event: EventClass.Event) { + handler.writeAndFlush(event) + } + + public override fun channelRead0(ctx: ChannelHandlerContext, msg: WebSocketFrame) { + val fragmentContents = msg.content() + fragmentContents.retain() + fragments.add(fragmentContents) + if (msg.isFinalFragment) { + val event = EventClass.Event.parseFrom(Unpooled.wrappedBuffer(*fragments.toTypedArray()).nioBuffer()) + fragments.forEach { it.release() } + fragments.clear() + doIfValid(event) { + doIfAvailable { + logEvent(event) + val jm = ObjectMapper() + val eventText = event.text + when (event.eventID) { + EventClass.Event.EventID.ESTABLISH -> wantNotEstablished { + val text = jm.readValue(eventText, JSON.QwilightEstablish::class.java) + language = text.language + AvatarHandler.establish( + this, + "*" + RandomStringUtils.randomAlphanumeric(19), + remote, + isValve = false, + isPause = false + ) + } + + EventClass.Event.EventID.SIGN_IN -> wantNotSignedIn { + if (allowSignIn()) { + trySignInDate() + try { + val text = jm.readValue(eventText, JSON.QwilightSignIn::class.java) + Configure.signIn( + this, + text.avatarID, + text.avatarCipher + ).thenAccept { + if (it != null) { + val avatarID = it[1] as String + AvatarHandler.handleSignIn( + this, + (it[0] as String), + "@$avatarID", + (it[2] as String), + it[3] as Int + ) + History.putHistory(this, avatarID) + } + } + } catch (e: JsonProcessingException) { + Configure.signIn(this, eventText).thenAccept { + if (it != null) { + val avatarID = it[0] as String + AvatarHandler.handleSignIn( + this, + eventText, + "@$avatarID", + it[1] as String, + it[2] as Int + ) + History.putHistory(this, avatarID) + } + } + } + } + } + + EventClass.Event.EventID.NOT_SIGN_IN -> wantSignedIn { handleNotSignIn() } + EventClass.Event.EventID.SITE_YELL -> wantEstablished { + SiteHandler.putSiteYell(this, jm.readValue(eventText, JSON.QwilightSiteYell::class.java)) + } + + EventClass.Event.EventID.GET_SITE_YELLS -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightGetSiteYells::class.java) + SiteHandler.getSiteYells(UUID.fromString(text.siteID), this, text) + } + + EventClass.Event.EventID.SET_SITE_HAND -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetSiteHand::class.java) + AvatarHandler.getAvatar(text.avatarID)?.let { + SiteHandler.setSiteHand( + this, UUID.fromString(text.siteID), it + ) + } + } + + EventClass.Event.EventID.EXILE_AVATAR -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightExileAvatar::class.java) + AvatarHandler.getAvatar(text.avatarID)?.let { + SiteHandler.exileAvatar( + UUID.fromString(text.siteID), + this, + it + ) + } + } + + EventClass.Event.EventID.SET_SITE_NAME -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightSetSiteName::class.java) + setSiteName(text.siteID, text.siteName) + } + + EventClass.Event.EventID.ENTER_SITE -> wantEstablished { + val text = jm.readValue(eventText, JSON.QwilightEnterSite::class.java) + SiteHandler.enterSite(SiteHandler.getSiteID(text.siteID), this, text.siteCipher) + } + + EventClass.Event.EventID.QUIT_SITE -> wantEstablished { + SiteHandler.quitAvatar( + this, UUID.fromString(eventText) + ) + } + + EventClass.Event.EventID.NEW_SITE -> wantEstablished { + doNewSite(jm.readValue(eventText, JSON.QwilightNewSite::class.java)) + } + + EventClass.Event.EventID.NEW_SILENT_SITE -> wantEstablished { + doNewSilentSite( + eventText + ) + } + + EventClass.Event.EventID.POST_FILE -> wantEstablished { + logFuture { + val data = event.getData(0).toByteArray() + val tmpPath = Configure.path.tmpPath.resolve( + "${RandomStringUtils.randomAlphanumeric(8)}.$eventText" + ) + Files.write(Configure.path.wwwPath.resolve(tmpPath), data) + send( + EventClass.Event.EventID.POST_FILE, "${Configure.www.remote}/${ + tmpPath.toString().replace(" ".toRegex(), "%20") + }" + ) + } + } + + else -> Unit + } + } + } + } + } + + override fun userEventTriggered(ctx: ChannelHandlerContext, evt: Any) { + if (evt is HandshakeComplete) { + handler = ctx + avatarIP = try { + InetAddress.getByName(evt.requestHeaders()["X-Real-IP"]) + } catch (e: UnknownHostException) { + (handler.channel().remoteAddress() as InetSocketAddress).address + } + } + } + + override fun toString(): String { + return "[$loggerID] Idle" + } + + override fun channelInactive(ctx: ChannelHandlerContext) { + AvatarHandler.quitAvatar(avatarID) + } + + override val loggerID: String + get() = if (isEstablished) { + if (isSignedIn) { + "{ID: $avatarID, Name: $avatarName, IP: $remote}" + } else { + if (avatarEstimatedID.isNotEmpty()) { + "{ID: $avatarID ($avatarEstimatedID?), Name: $avatarName, IP: $remote}" + } else { + "{ID: $avatarID, Name: $avatarName, IP: $remote}" + } + } + } else { + "{IP: $remote}}" + } + + override fun exceptionCaught(ctx: ChannelHandlerContext, cause: Throwable) { + logFault(cause) + } + + override fun logInfo(toNotify: String) { + LoggerFactory.getLogger(javaClass).info("[{}] {}", loggerID, toNotify) + } + + override fun logFault(e: Throwable) { + if (Utility.isValidFault(e)) { + LoggerFactory.getLogger(javaClass).error("[{}] {}", loggerID, Utility.getFault(e)) + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/site/SiteBoot.kt b/src/main/kotlin/net/taehui/twilight/site/SiteBoot.kt new file mode 100644 index 0000000..1190950 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/site/SiteBoot.kt @@ -0,0 +1,36 @@ +package net.taehui.twilight.site + +import io.netty.bootstrap.ServerBootstrap +import io.netty.channel.ChannelInitializer +import io.netty.channel.EventLoopGroup +import io.netty.channel.socket.ServerSocketChannel +import io.netty.channel.socket.SocketChannel +import io.netty.handler.codec.http.HttpObjectAggregator +import io.netty.handler.codec.http.HttpServerCodec +import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler +import io.netty.handler.codec.http.websocketx.extensions.compression.WebSocketServerCompressionHandler +import net.taehui.twilight.Logger + +class SiteBoot(eventLoopGroup: EventLoopGroup, eventChannel: Class) : Logger, Runnable { + private val mainBootstrap: ServerBootstrap + + init { + mainBootstrap = ServerBootstrap().group(eventLoopGroup).channel(eventChannel) + .childHandler(object : ChannelInitializer() { + public override fun initChannel(ch: SocketChannel) { + ch.pipeline() + .addLast(HttpServerCodec()) + .addLast(HttpObjectAggregator(Int.MAX_VALUE)) + .addLast(WebSocketServerCompressionHandler()) + .addLast(WebSocketServerProtocolHandler("/qwilight/ws", null, true, Int.MAX_VALUE)) + .addLast(SiteAvatar()) + } + }) + } + + override fun run() { + logInfo("Loading Site") + mainBootstrap.bind(6704).channel().closeFuture() + .addListener { logInfo("Closed Site") } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/AbilityClassSystem.kt b/src/main/kotlin/net/taehui/twilight/system/AbilityClassSystem.kt new file mode 100644 index 0000000..5824969 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/AbilityClassSystem.kt @@ -0,0 +1,101 @@ +package net.taehui.twilight.system + +import net.taehui.twilight.Logger +import java.nio.file.Path +import kotlin.io.path.pathString + +object AbilityClassSystem : Logger { + enum class AbilityClassVariety { + ABILITY_CLASS_5K, ABILITY_CLASS_7K, ABILITY_CLASS_9K + } + + private var abilityClasses = arrayOf(emptyArray>(), emptyArray>(), emptyArray>()) + + fun getAbilityClass(abilityClassVariety: AbilityClassVariety, abilityClass: Double): ByteArray { + val abilityClasses = abilityClasses[abilityClassVariety.ordinal] + + return when (abilityClass) { + -1.0, -2.0, -3.0 -> abilityClasses[0][0] + -4.0, -5.0, -6.0, -7.0, -8.0, -9.0, -10.0 -> abilityClasses[1][0] + else -> { + return if (0 <= abilityClass && abilityClass < 2) { + abilityClasses[2][(5 * abilityClass / 2).toInt()] + } else if (2 <= abilityClass && abilityClass < 13) { + abilityClasses[3][(5 * (abilityClass - 2) / 11).toInt()] + } else if (13 <= abilityClass && abilityClass < 33) { + abilityClasses[4][(5 * (abilityClass - 13) / 20).toInt()] + } else if (33 <= abilityClass && abilityClass < 62) { + abilityClasses[5][(5 * (abilityClass - 33) / 29).toInt()] + } else if (62 <= abilityClass && abilityClass < 100) { + abilityClasses[6][(5 * (abilityClass - 62) / 38).toInt()] + } else { + abilityClasses[7][0] + } + } + } + } + + fun loadAbilityClasses() { + fun loadAbilityClass(abilityClassVariety: AbilityClassVariety) { + fun loadDrawing(path: String): ByteArray { + return AbilityClassSystem::class.java.classLoader.getResourceAsStream( + Path.of( + when (abilityClassVariety) { + AbilityClassVariety.ABILITY_CLASS_5K -> "abilityClass5K" + AbilityClassVariety.ABILITY_CLASS_7K -> "abilityClass7K" + AbilityClassVariety.ABILITY_CLASS_9K -> "abilityClass9K" + }, + path + ).pathString + ) + .use { it!!.readAllBytes() } + } + + abilityClasses[abilityClassVariety.ordinal] = arrayOf( + arrayOf( + loadDrawing("S+.png") + ), arrayOf( + loadDrawing("S.png") + ), arrayOf( + loadDrawing("A+1.png"), + loadDrawing("A+2.png"), + loadDrawing("A+3.png"), + loadDrawing("A+4.png"), + loadDrawing("A+5.png") + ), arrayOf( + loadDrawing("A1.png"), + loadDrawing("A2.png"), + loadDrawing("A3.png"), + loadDrawing("A4.png"), + loadDrawing("A5.png") + ), arrayOf( + loadDrawing("B1.png"), + loadDrawing("B2.png"), + loadDrawing("B3.png"), + loadDrawing("B4.png"), + loadDrawing("B5.png") + ), arrayOf( + loadDrawing("C1.png"), + loadDrawing("C2.png"), + loadDrawing("C3.png"), + loadDrawing("C4.png"), + loadDrawing("C5.png") + ), arrayOf( + loadDrawing("D1.png"), + loadDrawing("D2.png"), + loadDrawing("D3.png"), + loadDrawing("D4.png"), + loadDrawing("D5.png") + ), arrayOf( + loadDrawing("F.png") + ) + ) + } + + loadAbilityClass(AbilityClassVariety.ABILITY_CLASS_5K) + loadAbilityClass(AbilityClassVariety.ABILITY_CLASS_7K) + loadAbilityClass(AbilityClassVariety.ABILITY_CLASS_9K) + + logInfo("Loaded Ability Class") + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/AbilitySystem.kt b/src/main/kotlin/net/taehui/twilight/system/AbilitySystem.kt new file mode 100644 index 0000000..759af8b --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/AbilitySystem.kt @@ -0,0 +1,166 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.JSON +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import net.taehui.twilight.Utility +import org.apache.hc.client5.http.classic.methods.HttpGet +import org.apache.hc.client5.http.impl.classic.BasicHttpClientResponseHandler +import org.apache.hc.client5.http.impl.classic.HttpClients +import org.jsoup.Jsoup +import java.io.IOException +import java.nio.file.Files + +object AbilitySystem : Logger { + class DefaultAbility { + var abilityFiles = emptyArray() + var abilityWww = emptyArray() + var abilityMap = emptyMap() + + class AbilityFile { + var fileName = "" + var abilityClassVariety = AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_5K + } + } + + class AbilityHashMap { + val hashMap128 = mutableMapOf() + val hashMap256 = mutableMapOf() + + fun wipe() { + hashMap128.clear() + hashMap256.clear() + } + } + + private val abilityHashMap = arrayOf(AbilityHashMap(), AbilityHashMap(), AbilityHashMap()) + var isLoading = false + + fun loadAbility() { + val jm = ObjectMapper() + isLoading = true + try { + val defaultAbility = jm.readValue( + TwilightComponent.ABILITY_ENTRY_PATH.resolve("Default.json").toFile(), + DefaultAbility::class.java + ) + if (Configure.mode.getAbility) { + try { + defaultAbility.abilityWww.forEach { target -> + try { + val o = Jsoup.connect(target).get() + var dataValue = o.selectXpath("/html/head/meta[@name='bmstable']") + if (dataValue.isEmpty()) { + dataValue = o.selectXpath("/html/body/meta[@name='bmstable']") + } + if (dataValue.isEmpty()) { + dataValue = o.selectXpath("/html/head/body/meta[@name='bmstable']") + } + if (!dataValue.isEmpty()) { + val www = dataValue[0].attr("content") + HttpClients.createDefault().use { + fun doModifyDataValue(target: String, dataValue: String): String { + return if (!Utility.isValidWww(dataValue)) { + if (target.substring(target.lastIndexOf('/')) + .contains(".") || target.endsWith("/") + ) { + "$target/../$dataValue" + } else { + "$target/$dataValue" + } + } else { + dataValue + } + } + + val text = it.execute( + HttpGet(doModifyDataValue(target, www)), + BasicHttpClientResponseHandler() + ) + val abilityTable = text.byteInputStream().use { src -> + ObjectMapper().readValue(src, JSON.BMSTable::class.java) + } + Files.writeString( + TwilightComponent.ABILITY_ENTRY_PATH.resolve("#" + abilityTable.name + ".json"), + text + ) + Files.writeString( + TwilightComponent.ABILITY_ENTRY_PATH.resolve(abilityTable.name + ".json"), + it.execute( + HttpGet(doModifyDataValue(target, abilityTable.data_url)), + BasicHttpClientResponseHandler() + ) + ) + logInfo("Saved Ability (${abilityTable.name})") + } + } + } catch (e: IOException) { + logFault(e) + } + } + } catch (e: IOException) { + logFault(e) + } + } + try { + val abilityMap = defaultAbility.abilityMap + abilityHashMap[AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_5K.ordinal].wipe() + abilityHashMap[AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_7K.ordinal].wipe() + Files.list(TwilightComponent.ABILITY_ENTRY_PATH).use { abilityFilePaths -> + abilityFilePaths.filter { it.fileName.toString().startsWith("#") }.sorted( + Comparator.comparingInt { abilityFilePath -> + defaultAbility.abilityFiles.indexOfFirst { + it.fileName == abilityFilePath.fileName.toString() + } + } + ).forEach { abilityFilePath -> + val abilityClassVariety = defaultAbility.abilityFiles.find { + it.fileName == abilityFilePath.fileName.toString() + }?.abilityClassVariety + if (abilityClassVariety != null) { + val abilityHashMap = abilityHashMap[abilityClassVariety.ordinal] + val abilityTable = jm.readValue(abilityFilePath.toFile(), JSON.BMSTable::class.java) + jm.readValue( + TwilightComponent.ABILITY_ENTRY_PATH.resolve(abilityTable.name + ".json").toFile(), + Array::class.java + ).forEach { + val ability = abilityMap[abilityTable.symbol + it.level] ?: 0.0 + if (ability > 0.0) { + if (it.md5.isNotEmpty()) { + abilityHashMap.hashMap128.putIfAbsent(it.md5, ability) + } + if (it.sha256.isNotEmpty()) { + abilityHashMap.hashMap256.putIfAbsent(it.sha256, ability) + } + } + } + logInfo("Loaded Ability (${abilityTable.name})") + } + } + } + } catch (e: IOException) { + logFault(e) + } + try { + DB.learnAbility() + logInfo("Learned Ability") + } catch (e: Throwable) { + logFault(e) + } + } catch (e: IOException) { + logFault(e) + } finally { + isLoading = false + } + } + + fun getAbility( + abilityClassVariety: AbilityClassSystem.AbilityClassVariety, + noteID128: String, + noteID256: String + ): Double { + val abilityHashMap = abilityHashMap[abilityClassVariety.ordinal] + return abilityHashMap.hashMap128.getOrDefault(noteID128, abilityHashMap.hashMap256.getOrDefault(noteID256, 0.0)) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/AutoSystem.kt b/src/main/kotlin/net/taehui/twilight/system/AutoSystem.kt new file mode 100644 index 0000000..7fac6e0 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/AutoSystem.kt @@ -0,0 +1,147 @@ +package net.taehui.twilight.system + +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import org.apache.commons.io.FilenameUtils +import java.nio.file.* +import java.util.concurrent.Executors +import java.util.concurrent.ScheduledExecutorService +import java.util.concurrent.ScheduledFuture +import java.util.concurrent.TimeUnit + +object AutoSystem : Logger { + private val ses: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor { + Executors.defaultThreadFactory().newThread(it).apply { + isDaemon = true + } + } + private val ws = FileSystems.getDefault().newWatchService() + private var futureVote: ScheduledFuture<*>? = null + private var futureConfigure: ScheduledFuture<*>? = null + private var futureAwilight: ScheduledFuture<*>? = null + private var futureTitle: ScheduledFuture<*>? = null + private var futureLevel: ScheduledFuture<*>? = null + private var futureAbility: ScheduledFuture<*>? = null + private var futureEdge: ScheduledFuture<*>? = null + + fun dispose() { + ws.close() + ses.shutdown() + } + + fun handleSystem() { + Thread { + Paths.get(".").register(ws, StandardWatchEventKinds.ENTRY_MODIFY) + TwilightComponent.DEFAULT_NOTE_ENTRY.register(ws, StandardWatchEventKinds.ENTRY_MODIFY) + TwilightComponent.DEFAULT_UI_ENTRY.register(ws, StandardWatchEventKinds.ENTRY_MODIFY) + TwilightComponent.TITLE_ENTRY_PATH.register(ws, StandardWatchEventKinds.ENTRY_MODIFY) + TwilightComponent.LEVEL_ENTRY_PATH.register(ws, StandardWatchEventKinds.ENTRY_MODIFY) + TwilightComponent.VOTE_ENTRY_PATH.register(ws, StandardWatchEventKinds.ENTRY_MODIFY) + TwilightComponent.ABILITY_ENTRY_PATH.register(ws, StandardWatchEventKinds.ENTRY_MODIFY) + TwilightComponent.EDGE_ENTRY_PATH.register(ws, StandardWatchEventKinds.ENTRY_MODIFY) + var isAvailable = true + while (isAvailable) { + try { + val tws = ws.take() + tws.pollEvents().forEach { + fun loadConfigure() { + futureConfigure?.cancel(true) + futureConfigure = ses.schedule({ + Configure.loadConfigure() + }, 1, TimeUnit.SECONDS) + } + + val filePath = (tws.watchable() as Path).resolve(it.context() as Path) + val fileName = filePath.fileName.toString() + when (filePath.parent.fileName.toString()) { + "Note", "UI" -> { + if (FilenameUtils.isExtension(fileName, "zip") || FilenameUtils.isExtension( + fileName, + "rar" + ) + ) { + loadConfigure() + } + } + + "Vote" -> { + if (FilenameUtils.isExtension(fileName, "json") && !VoteSystem.isLoading) { + futureVote?.cancel(true) + futureVote = ses.schedule( + { VoteSystem.loadVote() }, + 1, + TimeUnit.SECONDS + ) + } + } + + "Title" -> { + if (FilenameUtils.isExtension(fileName, "json") && !TitleSystem.isLoading) { + futureTitle?.cancel(true) + futureTitle = ses.schedule( + { TitleSystem.loadTitle() }, + 1, + TimeUnit.SECONDS + ) + } + } + + "Level" -> { + if (FilenameUtils.isExtension(fileName, "json") && !LevelSystem.isLoading) { + futureLevel?.cancel(true) + futureLevel = ses.schedule( + { LevelSystem.loadLevel() }, + 1, + TimeUnit.SECONDS + ) + } + } + + "Ability" -> { + if (FilenameUtils.isExtension(fileName, "json") && !AbilitySystem.isLoading) { + futureAbility?.cancel(true) + futureAbility = ses.schedule( + { AbilitySystem.loadAbility() }, + 1, + TimeUnit.SECONDS + ) + } + } + + "Edge" -> { + if (FilenameUtils.isExtension(fileName, "json") && !EdgeSystem.isLoading) { + futureEdge?.cancel(true) + futureEdge = ses.schedule( + { EdgeSystem.loadEdge() }, + 1, + TimeUnit.SECONDS + ) + } + } + + "." -> { + when (fileName) { + "Configure.json" -> loadConfigure() + + "Awilight.py" -> { + futureAwilight?.cancel(true) + futureAwilight = ses.schedule( + { AwilightHandler.loadAwilight() }, + 1, + TimeUnit.SECONDS + ) + } + } + } + } + } + tws.reset() + } catch (e: ClosedWatchServiceException) { + isAvailable = false + } catch (e: InterruptedException) { + isAvailable = false + } + } + }.apply { isDaemon = true }.start() + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/AvatarHandler.kt b/src/main/kotlin/net/taehui/twilight/system/AvatarHandler.kt new file mode 100644 index 0000000..5464a96 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/AvatarHandler.kt @@ -0,0 +1,113 @@ +package net.taehui.twilight.system + +import net.taehui.EventClass +import net.taehui.twilight.Avatar +import net.taehui.twilight.Logger +import java.util.concurrent.ConcurrentHashMap + +object AvatarHandler { + private val avatars = ConcurrentHashMap() + + fun justNotify(text: String) { + avatars.values.forEach { avatar -> + Translator.translate(avatar.language, text, avatar).thenAccept { + avatar.send(EventClass.Event.EventID.NOTIFY_INFO, it) + } + } + } + + fun doInfo(logger: Logger) { + avatars.values.filter { !it.isAwilight }.forEach { logger.logInfo(it.toString()) } + } + + fun getAvatar(avatarID: String): Avatar? { + return avatars[avatarID] + } + + fun establish(avatar: Avatar, avatarID: String, qwilightName: String, isValve: Boolean, isPause: Boolean) { + if (!isPause) { + avatar.setEstablished(avatarID, qwilightName, isValve) + } + avatars[avatar.avatarID] = avatar + } + + fun handleSignIn( + avatar: Avatar, + totem: String, + avatarID: String, + avatarName: String, + avatarCompetence: Int + ) { + synchronized(avatarID.intern()) { + handleNotSignIn(avatarID) + val avatarIDBefore = avatar.avatarID + avatar.handleSignIn(totem, avatarID, avatarName, avatarCompetence) + avatars.remove(avatarIDBefore)?.let { avatars.put(avatarID, it) } + } + } + + fun handleNotSignIn(avatarID: String) { + avatars.remove(avatarID)?.let { + it.handleNotSignIn() + avatars[it.avatarID] = it + } + } + + fun quitAvatar(avatarID: String) { + avatars.remove(avatarID)?.let { + it.doIfAvailable { + if (it.isSignedIn) { + it.handleNotSignIn() + } else { + SiteHandler.quitAvatar(it) + } + it.isAvailable = false + } + } + } + + fun pause(text: String) { + avatars.values.forEach { avatar -> + Translator.translate(avatar.language, text, avatar).thenAccept { + avatar.send(EventClass.Event.EventID.CLOSE, it) + avatar.close() + } + } + } + + fun sendInvalidateAvatarTitle(avatarID: String) { + avatars.values.forEach { + it.send( + EventClass.Event.EventID.INVALIDATE_AVATAR_TITLE, + avatarID + ) + } + } + + fun sendInvalidateAvatarDrawing(avatarID: String) { + avatars.values.forEach { + it.send( + EventClass.Event.EventID.INVALIDATE_AVATAR_DRAWING, + avatarID + ) + } + } + + fun sendInvalidateAvatarEdge(avatarID: String) { + avatars.values.forEach { + it.send( + EventClass.Event.EventID.INVALIDATE_AVATAR_EDGE, + avatarID + ) + } + } + + fun sendClose(text: String) { + avatars.values.forEach { + it.send( + EventClass.Event.EventID.CLOSE, + text + ) + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/AwilightHandler.kt b/src/main/kotlin/net/taehui/twilight/system/AwilightHandler.kt new file mode 100644 index 0000000..faf59eb --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/AwilightHandler.kt @@ -0,0 +1,107 @@ +package net.taehui.twilight.system + +import com.google.protobuf.UnsafeByteOperations +import io.netty.bootstrap.Bootstrap +import io.netty.channel.ChannelHandlerContext +import io.netty.channel.ChannelInitializer +import io.netty.channel.EventLoopGroup +import io.netty.channel.epoll.EpollSocketChannel +import io.netty.channel.socket.SocketChannel +import io.netty.channel.socket.nio.NioSocketChannel +import io.netty.handler.codec.protobuf.ProtobufDecoder +import io.netty.handler.codec.protobuf.ProtobufEncoder +import io.netty.handler.codec.protobuf.ProtobufVarint32FrameDecoder +import io.netty.handler.codec.protobuf.ProtobufVarint32LengthFieldPrepender +import io.netty.handler.ssl.SslContextBuilder +import io.netty.handler.ssl.util.InsecureTrustManagerFactory +import net.taehui.EventClass +import net.taehui.twilight.HCDataHandler +import net.taehui.twilight.Logger +import net.taehui.twilight.awilight.AwilightAvatar +import org.apache.commons.lang3.SystemUtils +import org.apache.hc.client5.http.classic.methods.HttpGet +import org.apache.hc.client5.http.impl.classic.HttpClients +import java.io.IOException +import java.time.LocalDateTime +import java.util.concurrent.ConcurrentHashMap + +object AwilightHandler : Logger { + private val avatars = ConcurrentHashMap() + lateinit var eventLoopGroup: EventLoopGroup + + fun putAvatar(handler: ChannelHandlerContext, avatar: AwilightAvatar) { + avatars[handler] = avatar + logValueFuture { + if (avatar.isBeginner) { + try { + HttpClients.createDefault().use { + UnsafeByteOperations.unsafeWrap( + it.execute( + HttpGet("https://source.unsplash.com/random?twilight"), + HCDataHandler() + ) + ) + } + } catch (e: IOException) { + logFault(e) + null + } + } else { + null + } + }.thenAccept { + val text = object { + val qwilightName = avatar.qwilightName + val hash = Configure.hash.randomOrNull() + val date = "" + val language = "ko-KR" + } + if (it != null) { + avatar.send(EventClass.Event.EventID.ESTABLISH, text, it) + } else { + avatar.send(EventClass.Event.EventID.ESTABLISH, text) + } + } + } + + fun loadAwilight() { + avatars.values.forEach { it.loadAwilight() } + logInfo("Loaded Awilight") + } + + fun quitAvatar(handler: ChannelHandlerContext) { + avatars.remove(handler)?.dispose() + } + + fun setAwilightCount(awilightCount: Int) { + WitSystem.wipeWit(this) + if (awilightCount > 0) { + WitSystem.handleLoop( + this, + LocalDateTime.now(), + awilightCount + ) { + Bootstrap().group(eventLoopGroup) + .channel(if (SystemUtils.IS_OS_LINUX) EpollSocketChannel::class.java else NioSocketChannel::class.java) + .handler(object : ChannelInitializer() { + public override fun initChannel(ch: SocketChannel) { + ch.pipeline() + .addLast( + SslContextBuilder.forClient().trustManager(InsecureTrustManagerFactory.INSTANCE) + .build() + .newHandler(ch.alloc(), "taehui.ddns.net", 6101) + ) + .addLast(ProtobufVarint32FrameDecoder()) + .addLast(ProtobufDecoder(EventClass.Event.getDefaultInstance())) + .addLast(ProtobufVarint32LengthFieldPrepender()) + .addLast(ProtobufEncoder()) + .addLast(AwilightAvatar()) + } + }).connect("localhost", 6101) + } + } else { + avatars.keys.stream().limit(-awilightCount.toLong()) + .forEach { it.close() } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/BannedIP.kt b/src/main/kotlin/net/taehui/twilight/system/BannedIP.kt new file mode 100644 index 0000000..bb2f55b --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/BannedIP.kt @@ -0,0 +1,54 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.databind.ObjectMapper +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule +import net.taehui.twilight.Logger +import java.io.IOException +import java.nio.file.Paths +import java.time.LocalDateTime +import java.util.concurrent.ConcurrentHashMap + +object BannedIP : Logger { + private var bannedIPStore = ConcurrentHashMap() + + private fun getJSONMapper(): ObjectMapper { + val jm = ObjectMapper() + jm.registerModule(JavaTimeModule()) + return jm + } + + fun loadBannedIP() { + try { + bannedIPStore.putAll( + getJSONMapper().readValue( + Paths.get("Banned IP.json").toFile(), + object : TypeReference>() {}) + ) + logInfo("Loaded Banned IP") + saveBannedIP() + } catch (e: IOException) { + logFault(e) + } + } + + fun saveBannedIP() { + getJSONMapper().writerWithDefaultPrettyPrinter().writeValue( + Paths.get("Banned IP.json").toFile(), + bannedIPStore + ) + logInfo("Saved Banned IP") + } + + fun putBannedIP(avatarIP: String, date: LocalDateTime) { + bannedIPStore[avatarIP] = date + } + + fun wipeBannedIP(avatarIP: String) { + bannedIPStore.remove(avatarIP) + } + + fun isBanned(avatarIP: String): Boolean { + return bannedIPStore.getOrDefault(avatarIP, LocalDateTime.MIN).isAfter(LocalDateTime.now()) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/BannedNote.kt b/src/main/kotlin/net/taehui/twilight/system/BannedNote.kt new file mode 100644 index 0000000..c75d0cc --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/BannedNote.kt @@ -0,0 +1,44 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.Logger +import java.io.IOException +import java.nio.file.Paths +import java.util.concurrent.ConcurrentHashMap + +object BannedNote : Logger { + private var bannedNoteStore = mutableMapOf() + + fun loadBannedNote() { + try { + bannedNoteStore.putAll( + ObjectMapper().readValue( + Paths.get("Banned Note.json").toFile(), + object : TypeReference>() {}) + ) + logInfo("Loaded Banned Note") + saveBannedNote() + } catch (e: IOException) { + logFault(e) + } + } + + fun saveBannedNote() { + ObjectMapper().writerWithDefaultPrettyPrinter() + .writeValue(Paths.get("Banned Note.json").toFile(), bannedNoteStore) + logInfo("Saved Banned Note") + } + + fun putBannedIP(noteID: String, comment: String) { + bannedNoteStore[noteID] = comment + } + + fun wipeBannedNote(noteID: String) { + bannedNoteStore.remove(noteID) + } + + fun isBanned(noteID: String): Boolean { + return bannedNoteStore.contains(noteID) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/Configure.kt b/src/main/kotlin/net/taehui/twilight/system/Configure.kt new file mode 100644 index 0000000..1ba175d --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/Configure.kt @@ -0,0 +1,265 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.annotation.JsonGetter +import com.fasterxml.jackson.annotation.JsonIgnore +import com.fasterxml.jackson.annotation.JsonSetter +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.EventClass +import net.taehui.twilight.Avatar +import net.taehui.twilight.JSON +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import org.apache.hc.client5.http.HttpResponseException +import org.apache.hc.client5.http.classic.methods.HttpPatch +import org.apache.hc.client5.http.classic.methods.HttpPost +import org.apache.hc.client5.http.impl.classic.BasicHttpClientResponseHandler +import org.apache.hc.client5.http.impl.classic.HttpClients +import org.apache.hc.core5.http.ContentType +import org.apache.hc.core5.http.io.entity.StringEntity +import java.io.IOException +import java.lang.reflect.Modifier +import java.nio.file.Files +import java.nio.file.Path +import java.nio.file.Paths +import java.util.concurrent.CompletableFuture +import java.util.concurrent.TimeUnit + +object Configure : Logger { + class PathItem { + @JvmField + var www = "" + + @JvmField + var tmp = "" + + @JvmField + var date = "" + + @JsonIgnore + lateinit var wwwPath: Path + + @JsonIgnore + lateinit var tmpPath: Path + + @JsonIgnore + lateinit var datePath: Path + + @JsonSetter + fun setWww(www: String) { + this.www = www + wwwPath = Paths.get(www) + } + + @JsonSetter + fun setTmp(tmp: String) { + this.tmp = tmp + tmpPath = Paths.get(tmp) + } + + @JsonSetter + fun setDate(date: String) { + this.date = date + datePath = Paths.get(date) + } + } + + class DBItem { + var auth = "" + var db = "" + var remote = "" + var avatar = "" + var format = "" + } + + class FaxItem { + var auth = "" + var remote = "" + var avatar = "" + } + + class JavaCipherStore { + @get:JsonGetter + lateinit var pw0: CharArray + + @get:JsonGetter + lateinit var pw1: CharArray + + @JsonSetter + fun setPw0(pw0: String) { + this.pw0 = pw0.toCharArray() + } + + @JsonSetter + fun setPw1(pw1: String) { + this.pw1 = pw1.toCharArray() + } + } + + class Mode { + @JsonIgnore + lateinit var funcEstablish: (Avatar, Array, (isPause: Boolean) -> Unit) -> Unit + + @JsonIgnore + lateinit var funcSignIn: (Array) -> CompletableFuture?> + + @JvmField + var allowEstablish = false + + @JvmField + var allowSignIn = false + var pause = false + var getAbility = false + var platform = false + var tv = false + + @JsonSetter + fun setAllowEstablish(allowEstablish: Boolean) { + this.allowEstablish = allowEstablish + funcEstablish = { avatar, data, onHandled -> + avatar.qwilightHash = data[0] as String + avatar.qwilightDate = data[1] as String + if (pause) { + avatar.send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("pause")) + onHandled(true) + } else if (BannedIP.isBanned(avatar.remote)) { + avatar.send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("bannedIP")) + } else if (allowEstablish || avatar.avatarIP.isLoopbackAddress || avatar.avatarIP.isSiteLocalAddress || hash.contains( + avatar.qwilightHash + ) + ) { + onHandled(false) + } else { + if (data[2] as Boolean) { + avatar.send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("unavailableValveDate")) + } else { + avatar.send( + EventClass.Event.EventID.UNAVAILABLE_DATE, + avatar.translateLanguage("unavailableDate") + ) + } + } + } + } + + @JsonSetter + fun setAllowSignIn(allowSignIn: Boolean) { + this.allowSignIn = allowSignIn + funcSignIn = if (allowSignIn) { + { data -> + logValueFuture { + val pendingAvatarID = data[1] as String + arrayOf("", pendingAvatarID, pendingAvatarID, 1) + } + } + } else { + { data -> + logValueFuture { + val avatar = data[0] as Avatar + val jm = ObjectMapper() + HttpClients.createDefault().use { + val dataPost = HttpPost(www.taehui + "/avatar/getTotem") + dataPost.setHeader("millis", System.currentTimeMillis()) + dataPost.setHeader("X-Real-IP", avatar.remote) + dataPost.entity = StringEntity( + jm.writeValueAsString( + object { + val avatarID = (data[1] as String) + val avatarCipher = (data[2] as String) + }), ContentType.APPLICATION_JSON + ) + try { + val taehuiGetTotem = jm.readValue( + it.execute(dataPost, BasicHttpClientResponseHandler()), + JSON.TaehuiGetTotem::class.java + ) + arrayOf( + taehuiGetTotem.totem, + taehuiGetTotem.avatarID, + taehuiGetTotem.avatarName, + taehuiGetTotem.level + ) + } catch (e: HttpResponseException) { + avatar.send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("wrongAvatar")) + null + } + } + } + } + } + } + } + + class Www { + var qwilight = "" + var taehui = "" + var remote = "" + } + + class NHN { + var nhnID = "" + var nhnPw = "" + } + + lateinit var path: PathItem + lateinit var db: DBItem + lateinit var fax: FaxItem + lateinit var javaCipherStore: JavaCipherStore + var hash = mutableSetOf() + lateinit var mode: Mode + lateinit var www: Www + lateinit var nhn: NHN + var awilightCount = 0 + var defaultNoteDate = 0L + var defaultUIDate = 0L + + fun loadConfigure() { + try { + val text = ObjectMapper().readValue(Paths.get("Configure.json").toFile(), Configure::class.java) + Configure::class.java.fields.forEach { + if (it.getAnnotation(JsonIgnore::class.java)?.value != true && it.modifiers and Modifier.FINAL != Modifier.FINAL) { + it[this] = it[text] ?: throw RuntimeException(it.name) + } + } + defaultNoteDate = Files.getLastModifiedTime(TwilightComponent.DEFAULT_NOTE_ENTRY).to(TimeUnit.MILLISECONDS) + defaultUIDate = Files.getLastModifiedTime(TwilightComponent.DEFAULT_UI_ENTRY).to(TimeUnit.MILLISECONDS) + logInfo("Loaded Configure") + } catch (e: IOException) { + logFault(e) + } + } + + fun saveConfigure() { + Files.newOutputStream(Paths.get("Configure.json")).use { + ObjectMapper().writerWithDefaultPrettyPrinter().writeValue(it, this) + logInfo("Saved Configure") + } + } + + fun signIn(avatar: Avatar, pendingAvatarID: String, pw: String): CompletableFuture?> { + return mode.funcSignIn(arrayOf(avatar, pendingAvatarID, pw)) + } + + fun signIn(avatar: Avatar, totem: String): CompletableFuture?> { + return logValueFuture { + HttpClients.createDefault().use { + val data = HttpPatch(www.taehui + "/avatar/totem") + data.setHeader("X-Real-IP", avatar.remote) + data.setHeader("millis", System.currentTimeMillis()) + data.setHeader("totem", totem) + try { + val taehuiTotem = ObjectMapper().readValue( + it.execute(data, BasicHttpClientResponseHandler()), JSON.TaehuiTotem::class.java + ) + arrayOf(taehuiTotem.avatarID, taehuiTotem.avatarName, taehuiTotem.level) + } catch (e: HttpResponseException) { + avatar.send(EventClass.Event.EventID.FAILED_VALIDATE_TOTEM, null) + null + } + } + } + } + + fun establish(avatar: Avatar, hash: String, date: String, isValve: Boolean, onHandled: (isPause: Boolean) -> Unit) { + mode.funcEstablish(avatar, arrayOf(hash, date, isValve), onHandled) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/DB.kt b/src/main/kotlin/net/taehui/twilight/system/DB.kt new file mode 100644 index 0000000..608882b --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/DB.kt @@ -0,0 +1,3468 @@ +package net.taehui.twilight.system + +import net.taehui.twilight.* +import net.taehui.twilight.BundleIO.BundleVariety +import net.taehui.twilight.awilight.Component +import net.taehui.twilight.qwilight.QwilightAvatar +import org.apache.commons.dbcp2.BasicDataSource +import org.apache.commons.io.FileUtils +import org.apache.commons.io.FilenameUtils +import org.apache.commons.lang3.SystemUtils +import java.io.IOException +import java.nio.file.Files +import java.nio.file.Path +import java.sql.PreparedStatement +import java.sql.SQLIntegrityConstraintViolationException +import java.sql.Timestamp +import java.time.Instant +import java.time.LocalDate +import java.time.ZoneId +import java.time.format.DateTimeFormatter +import java.util.* +import java.util.concurrent.CompletableFuture +import java.util.stream.Stream +import kotlin.math.pow + +object DB : Logger { + private val pool = BasicDataSource() + private val yyyyMMFormat = DateTimeFormatter.ofPattern("yyyy-MM").withZone(ZoneId.systemDefault()) + private val yyyyMMDDFormat = DateTimeFormatter.ofPattern("yyyy-MM-dd").withZone(ZoneId.systemDefault()) + + private fun testDB(isTest: Boolean) { + if (SystemUtils.IS_OS_WINDOWS) { + Runtime.getRuntime().exec(arrayOf("wsl", "sudo", "service", "mariadb", "start")).waitFor() + } else if (isTest) { + Runtime.getRuntime().exec(arrayOf("sudo", "service", "mariadb", "start")).waitFor() + } + } + + private fun setBaseDB() { + pool.connection.use { + it.createStatement().use { dbStatement -> + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_note ( + Note_ID VARCHAR(139), + Note_ID_128 CHAR(32), + Note_ID_256 CHAR(64), + Note_Variety INTEGER, + Artist TEXT, + Title TEXT, + Genre TEXT, + Level_Text TEXT, + Level INTEGER, + Input_Mode INTEGER, + Total_Notes INTEGER, + Is_Salt BOOLEAN, + Ability_5K REAL, + Ability_7K REAL, + Ability_9K REAL, + Length REAL, + PRIMARY KEY (Note_ID) + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_comment ( + Date TIMESTAMP, + Note_ID VARCHAR(139), + Avatar VARCHAR(20), + Multiplier REAL, + Auto_Mode INTEGER, + Note_Salt_Mode INTEGER, + Audio_Multiplier REAL, + Faint_Note_Mode INTEGER, + Judgment_Mode INTEGER, + Hit_Points_Mode INTEGER, + Note_Mobility_Mode INTEGER, + Long_Note_Mode INTEGER, + Input_Favor_Mode INTEGER, + Note_Modify_Mode INTEGER, + Lowest_Judgment_Condition_Mode INTEGER, + Stand INTEGER, + Band INTEGER, + Is_P BOOLEAN, + Point REAL, + Salt INTEGER, + Comment_ID CHAR(128), + Is_Max BOOLEAN, + Is_Paused BOOLEAN, + Input_Flags INTEGER, + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE, + CHECK (Multiplier >= 0.0), + CHECK (Auto_Mode IN (0, 1)), + CHECK (Note_Salt_Mode IN (0, 1, 2, 4, 11, 13)), + CHECK (Audio_Multiplier >= 0.5 AND Audio_Multiplier <= 2.0), + CHECK (Faint_Note_Mode IN (0, 1, 2, 3)), + CHECK (Judgment_Mode IN (0, 1, 2, 3, 4)), + CHECK (Hit_Points_Mode IN (0, 1, 2, 3, 4, 5)), + CHECK (Note_Mobility_Mode IN (0, 1, 3, 4, 5)), + CHECK (Long_Note_Mode IN (0, 1)), + CHECK (Input_Favor_Mode IN (0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)), + CHECK (Note_Modify_Mode IN (0, 1)), + CHECK (Lowest_Judgment_Condition_Mode IN (0, 1)), + CHECK (Stand >= 0 AND Stand <= 1000000), + CHECK (Band >= 0), + CHECK (Point >= 0.0 AND Point <= 1.0), + CHECK (Input_Flags >= 0 AND Input_Flags <= 15) + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_bundle ( + Avatar VARCHAR(20), + Date TIMESTAMP, + Name VARCHAR(191), + Length LONG, + Competence INTEGER, + Variety INTEGER, + Etc TEXT, + PRIMARY KEY (Avatar, Name), + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE, + CHECK (Competence IN (0, 1, 2)), + CHECK (Variety IN (0, 1, 2)) + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_ubuntu ( + Avatar VARCHAR(20), + Ubuntu VARCHAR(20), + PRIMARY KEY (Avatar, Ubuntu), + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE, + FOREIGN KEY (Ubuntu) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_avatar ( + Avatar VARCHAR(20), + Silent_Site INTEGER, + Notify_Ubuntu INTEGER, + Default_Bundle_Competence INTEGER, + IO_Competence INTEGER, + Notify_Save_Bundle INTEGER, + PRIMARY KEY (Avatar), + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE, + CHECK (Silent_Site IN (0, 1, 2, 3)), + CHECK (Notify_Ubuntu IN (0, 1)), + CHECK (Default_Bundle_Competence IN (0, 1, 2, 3)), + CHECK (IO_Competence IN (0, 1, 2, 3)), + CHECK (Notify_Save_Bundle IN (0, 1, 2, 3)) + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_title ( + Avatar VARCHAR(20), + Title_ID CHAR(36), + PRIMARY KEY (Avatar), + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_edge ( + Avatar VARCHAR(20), + Edge_ID CHAR(36), + PRIMARY KEY (Avatar), + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_site ( + Site_ID CHAR(36), + Avatar_ID VARCHAR(20), + Avatar_Name VARCHAR(255), + Date LONG, + Site_Yell TEXT, + Platform_ID LONG + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_level ( + Avatar VARCHAR(20), + Level_ID CHAR(36), + Date TIMESTAMP, + PRIMARY KEY (Avatar, Level_ID), + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_commentary ( + Note_ID VARCHAR(139), + Avatar VARCHAR(20), + Commentary TEXT, + PRIMARY KEY (Avatar, Note_ID), + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_translated ( + Text VARCHAR(766), + Target_Language CHAR(2), + Translated_Text TEXT, + PRIMARY KEY (Text, Target_Language) + ) ENGINE=InnoDB + """.trimIndent() + ) + dbStatement.executeUpdate( + """ + CREATE TABLE IF NOT EXISTS tw_favor ( + Note_ID VARCHAR(139), + Avatar VARCHAR(20), + Date TIMESTAMP, + Favor BOOLEAN, + PRIMARY KEY (Avatar, Note_ID), + FOREIGN KEY (Avatar) REFERENCES tn_avatar(Avatar_ID) ON UPDATE CASCADE ON DELETE CASCADE + ) ENGINE=InnoDB + """.trimIndent() + ) + } + } + } + + fun getSiteYells(siteID: String): Collection { + pool.connection.use { + it.prepareStatement( + """ + SELECT Avatar_ID, Avatar_Name, Date, Site_Yell, Platform_ID + FROM tw_site + WHERE Site_ID = ? + ORDER BY Date + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, siteID) + dbStatement.executeQuery().use { rows -> + val data = LinkedList() + var siteYellID = -1 + while (rows.next()) { + data.add( + SiteYell( + rows.getString("Avatar_ID"), + rows.getString("Avatar_Name"), + rows.getLong("Date"), + rows.getString("Site_Yell"), + ++siteYellID, + rows.getLong("Platform_ID") + ) + ) + } + return data + } + } + } + } + + fun loadDB(isTest: Boolean) { + testDB(isTest) + val db = Configure.db + pool.url = "jdbc:mariadb://" + db.remote + "/" + db.db + pool.username = db.avatar + pool.password = db.auth + setBaseDB() + logInfo("Loaded DB") + } + + fun setFavor(qwilightSetFavor: JSON.QwilightSetFavor, avatarID: String): CompletableFuture { + return logFuture { + pool.connection.use { + val noteID = qwilightSetFavor.noteID + val favor = qwilightSetFavor.favor + if (favor != null) { + it.prepareStatement( + """ + REPLACE INTO tw_favor(Note_ID, Avatar, Favor) + VALUES(?, ?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.setBoolean(3, favor) + dbStatement.execute() + } + } else { + it.prepareStatement( + """ + DELETE + FROM tw_favor + WHERE Note_ID = ? AND Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.execute() + } + } + } + } + } + + fun loadTranslatedText(text: String, targetLanguage: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Translated_Text + FROM tw_translated + WHERE Text = ? AND Target_Language = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, text) + dbStatement.setString(2, targetLanguage) + dbStatement.executeQuery().use { rows -> + if (rows.next()) rows.getString("Translated_Text") else "" + } + } + } + } + } + + fun saveTranslatedText(text: String, targetLanguage: String, translatedText: String): CompletableFuture { + return logFuture { + pool.connection.use { + it.prepareStatement( + """ + REPLACE INTO tw_translated + VALUES(?, ?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, text) + dbStatement.setString(2, targetLanguage) + dbStatement.setString(3, translatedText) + dbStatement.execute() + } + } + } + } + + fun getQwilightNames(): List { + pool.connection.use { + it.prepareStatement( + """ + SELECT Avatar_Name + FROM tn_avatar + ORDER BY Last_Date + LIMIT 100 + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + val data = mutableListOf() + while (rows.next()) { + data.add(rows.getString("Avatar_Name")) + } + return data + } + } + } + } + + fun getWipeNote(noteID: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT COUNT(Note_ID) AS Count + FROM tw_note + WHERE Note_ID LIKE ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, "$noteID:%") + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + rows.getInt("Count") + } else { + 0 + } + } + } + } + } + } + + fun wipeNote(noteID: String): CompletableFuture { + return logFuture { + pool.connection.use { + it.prepareStatement( + """ + DELETE + FROM tw_comment + WHERE Note_ID LIKE ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, "$noteID:%") + val wipedCount = dbStatement.executeUpdate() + FileUtils.deleteDirectory(TwilightComponent.COMMENT_ENTRY_PATH.resolve(noteID).toFile()) + logInfo("Wiped $wipedCount Comments") + } + } + pool.connection.use { + it.prepareStatement( + """ + DELETE + FROM tw_note + WHERE Note_ID LIKE ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, "$noteID:%") + val wipedCount = dbStatement.executeUpdate() + FileUtils.deleteQuietly(TwilightComponent.NOTE_ENTRY_PATH.resolve(noteID).toFile()) + logInfo("Wiped $wipedCount Notes") + } + } + } + } + + fun wipeNotes() { + pool.connection.use { + it.prepareStatement( + """ + DELETE + FROM tw_note + """.trimIndent() + ).use { dbStatement -> dbStatement.execute() } + } + } + + fun getWipeNotes(): CompletableFuture> { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT tw_note.Note_ID, Artist, Title + FROM tw_note LEFT OUTER JOIN tw_comment + ON tw_note.Note_ID = tw_comment.Note_ID + WHERE tw_comment.Note_ID IS NULL + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + val noteIDs = mutableSetOf() + while (rows.next()) { + val noteID = rows.getString("Note_ID") + if (!LevelSystem.levelNoteIDs.contains(noteID)) { + noteIDs.add(noteID) + } + } + noteIDs + } + } + } + } + } + + fun wipeNotes(noteIDs: Collection): CompletableFuture { + return logFuture { + logInfo( + "Wiped ${ + noteIDs.count { noteID -> + pool.connection.use { + it.prepareStatement( + """ + DELETE + FROM tw_note + WHERE Note_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.execute() + true + } + } + } + } Notes" + ) + logInfo( + "Wiped ${ + noteIDs.count { + try { + Files.delete(TwilightComponent.NOTE_ENTRY_PATH.resolve(it.substring(0, it.indexOf(':')))) + true + } catch (e: IOException) { + logFault(e) + false + } + } + } Note Files") + } + } + + fun getWipeComment(avatarID: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT COUNT(Comment_ID) AS Count + FROM tw_comment + WHERE Avatar LIKE ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + rows.getInt("Count") + } else { + 0 + } + } + } + } + } + } + + fun wipeComment(avatarID: String): CompletableFuture { + return logFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Note_ID, Comment_ID + FROM tw_comment + WHERE Avatar LIKE ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + var wipedCount = 0 + while (rows.next()) { + try { + var noteID = rows.getString("Note_ID") + noteID = noteID.substring(0, noteID.indexOf(':')) + Files.delete( + TwilightComponent.COMMENT_ENTRY_PATH.resolve(noteID) + .resolve("${rows.getString("Comment_ID")}.xz") + ) + ++wipedCount + } catch (e: IOException) { + logFault(e) + } + } + logInfo("Wiped $wipedCount Comment Files") + } + } + } + pool.connection.use { + it.prepareStatement( + """ + DELETE + FROM tw_comment + WHERE Avatar LIKE ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + logInfo("Wiped ${dbStatement.executeUpdate()} Comments") + } + } + } + } + + fun getWipeComments(): CompletableFuture> { + return logValueFuture { + Files.newDirectoryStream(TwilightComponent.COMMENT_ENTRY_PATH).use { commentEntryPaths -> + commentEntryPaths.map { commentEntryPath -> + Files.list(commentEntryPath).use { commentFilePaths -> + commentFilePaths.map { commentFilePath -> + pool.connection.use { + it.prepareStatement( + """ + SELECT Comment_ID + FROM tw_comment + WHERE Note_ID LIKE ? AND Comment_ID = ? AND Is_Max = true + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, commentEntryPath.fileName.toString() + ":%") + dbStatement.setString( + 2, FilenameUtils.removeExtension(commentFilePath.fileName.toString()) + ) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + null + } else { + commentFilePath + } + } + } + } + }.toList() + } + }.flatMap { it.toList() }.filterNotNull() + } + } + } + + fun wipeComments(commentFilePaths: Collection): CompletableFuture { + return logFuture { + logInfo( + "Wiped ${ + commentFilePaths.count { + try { + Files.delete(it) + true + } catch (e: IOException) { + logFault(e) + false + } + } + } Comment Files" + ) + } + } + + fun getWipeBundles(): CompletableFuture> { + return logValueFuture { + Files.newDirectoryStream(TwilightComponent.BUNDLE_ENTRY_PATH).use { bundleEntryPaths -> + bundleEntryPaths.map { bundleEntryPath -> + Files.list(bundleEntryPath).use { bundleFilePaths -> + bundleFilePaths.map { bundleFilePath -> + pool.connection.use { + it.prepareStatement( + """ + SELECT Avatar, Name + FROM tw_bundle + WHERE Avatar = ? AND Name = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, bundleEntryPath.fileName.toString()) + dbStatement.setString( + 2, FilenameUtils.removeExtension(bundleFilePath.fileName.toString()) + ) + dbStatement.executeQuery().use { rows -> + if (!rows.next()) { + bundleFilePath + } else { + null + } + } + } + } + }.toList() + } + }.flatMap { it.toList() }.filterNotNull() + } + } + } + + fun wipeBundles(bundleFilePaths: Collection) { + logValueFuture { + logInfo( + "Wiped ${ + bundleFilePaths.count { + try { + Files.delete(it) + true + } catch (e: IOException) { + logFault(e) + false + } + } + } Bundle Files" + ) + } + } + + interface ICommentary { + var commentary: String + } + + fun getComment( + noteID: String, + avatarID: String, + language: String, + target: Boolean, + logger: Logger + ): CompletableFuture { + val comments = mutableListOf() + return logValueFuture { + val commentaryMap = mutableMapOf() + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT Avatar, Commentary + FROM tw_commentary + WHERE Note_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + commentaryMap[rows.getString("Avatar")] = rows.getString("Commentary") + } + } + } + } + + val favor = if (avatarID.isEmpty()) null else pool.connection.use { + it.prepareStatement( + """ + SELECT Favor + FROM tw_favor + WHERE Note_ID = ? AND Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) rows.getBoolean("Favor") else null + } + } + } + val ubuntu = if (avatarID.isEmpty() || !target) null else getUbuntu(avatarID).join().map { it[0] } + .toMutableList().apply { add(avatarID) } + + var totalFavor = 0 + pool.connection.use { + it.prepareStatement( + """ + SELECT Favor + FROM tw_favor + WHERE Note_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + totalFavor += if (rows.getBoolean("Favor")) 1 else -1 + } + } + } + } + totalFavor = 0.coerceAtLeast(totalFavor) + + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT tw_comment.Date, Avatar_ID, Avatar_Name, Multiplier, Auto_Mode, Note_Salt_Mode, Audio_Multiplier, Faint_Note_Mode, Judgment_Mode, Hit_Points_Mode, Note_Mobility_Mode, Long_Note_Mode, Input_Favor_Mode, Note_Modify_Mode, Lowest_Judgment_Condition_Mode, Stand, Band, Is_P, Point, Salt, Comment_ID, Is_Paused, Input_Flags + FROM tw_comment, tn_avatar + WHERE Avatar_ID = Avatar AND tw_comment.Note_ID = ? AND Is_Max = true + ORDER BY Stand DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + if (ubuntu?.contains(rows.getString("Avatar_ID")) != false) { + comments.add(object : ICommentary { + val avatarID = rows.getString("Avatar_ID") + override var commentary = commentaryMap.getOrDefault(this.avatarID, "") + val date = rows.getTimestamp("Date") + val avatarName = rows.getString("Avatar_Name") + val multiplier = rows.getDouble("Multiplier") + val autoMode = rows.getInt("Auto_Mode") + val noteSaltMode = rows.getInt("Note_Salt_Mode") + val audioMultiplier = rows.getDouble("Audio_Multiplier") + val faintNoteMode = rows.getInt("Faint_Note_Mode") + val judgmentMode = rows.getInt("Judgment_Mode") + val hitPointsMode = rows.getInt("Hit_Points_Mode") + val noteMobilityMode = rows.getInt("Note_Mobility_Mode") + val longNoteMode = rows.getInt("Long_Note_Mode") + val inputFavorMode = rows.getInt("Input_Favor_Mode") + val noteModifyMode = rows.getInt("Note_Modify_Mode") + val lowestJudgmentConditionMode = rows.getInt("Lowest_Judgment_Condition_Mode") + val stand = rows.getInt("Stand") + val band = rows.getInt("Band") + + @JvmField + val isP = rows.getBoolean("Is_P") + val point = rows.getDouble("Point") + val salt = rows.getInt("Salt") + val commentID = rows.getString("Comment_ID") ?: "" + + @JvmField + val isPaused = rows.getBoolean("Is_Paused") + + val inputFlags = rows.getInt("Input_Flags") + }) + } + } + + CompletableFuture.allOf(*comments.filter { it.commentary.isNotEmpty() }.map { + Translator.translate( + language, + it.commentary, + logger + ).thenApply { translatedText -> + it.commentary = translatedText + } + }.toTypedArray()).join() + + object { + val favor = favor + val totalFavor = totalFavor + val comments = comments + } + } + } + } + } + } + + fun setAvatarTitle(avatarID: String, titleID: String): CompletableFuture { + return logFuture { + pool.connection.use { db -> + if (titleID.isEmpty()) { + db.prepareStatement( + """ + DELETE + FROM tw_title + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.execute() + } + } else { + if (TitleSystem.getTitleIDs( + getLevelIDs(avatarID), getNoteIDs(avatarID), getAvatarLevels(avatarID)[0] + ).stream().anyMatch { it == titleID } + ) { + db.prepareStatement( + """ + REPLACE INTO tw_title + VALUES(?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, titleID) + dbStatement.execute() + } + } + } + } + } + } + + fun setCommentary(noteID: String, avatarID: String, commentary: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + val hasComment: Boolean + it.prepareStatement( + """ + SELECT Comment_ID + FROM tw_comment + WHERE Note_ID = ? AND Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.executeQuery().use { rows -> hasComment = rows.next() } + } + if (commentary.isBlank()) { + if (hasComment) { + it.prepareStatement( + """ + DELETE + FROM tw_commentary + WHERE Note_ID = ? AND Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.execute() + } + } + true + } else { + if (hasComment) { + it.prepareStatement( + """ + REPLACE INTO tw_commentary + VALUES(?, ?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.setString(3, commentary) + dbStatement.execute() + } + } + hasComment + } + } + } + } + + fun setBundle(qwilightSetBundle: JSON.QwilightSetBundle, avatarID: String) { + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + UPDATE tw_bundle + SET Competence = ?, Date = Date + WHERE Avatar = ? AND Name = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setInt(1, qwilightSetBundle.bundleCompetence) + dbStatement.setString(2, avatarID) + dbStatement.setString(3, qwilightSetBundle.bundleName) + dbStatement.execute() + } + } + } + } + + fun getBundles(avatarID: String): CompletableFuture>, Long>?> { + return logValueFuture { + pool.connection.use { + val data = mutableListOf>() + it.prepareStatement( + """ + SELECT * + FROM tw_bundle + WHERE Avatar = ? + ORDER BY Date DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + data.add( + arrayOf( + rows.getTimestamp("Date").time, + rows.getString("Name"), + rows.getLong("Length"), + rows.getInt("Competence"), + rows.getInt("Variety") + ) + ) + } + } + } + it.prepareStatement( + """ + SELECT SUM(Length) AS Length + FROM tw_bundle + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + Pair(data, rows.getLong("Length")) + } else { + null + } + } + } + } + } + } + + fun setConfigure(qwilightSetConfigure: JSON.QwilightSetConfigure, avatarID: String) { + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + REPLACE INTO tw_avatar + VALUES(?, ?, ?, ?, ?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setInt(2, qwilightSetConfigure.silentSiteCompetence) + dbStatement.setInt(3, qwilightSetConfigure.toNotifyUbuntuCompetence) + dbStatement.setInt(4, qwilightSetConfigure.defaultBundleCompetence) + dbStatement.setInt(5, qwilightSetConfigure.ioCompetence) + dbStatement.setInt(6, qwilightSetConfigure.toNotifySaveBundleCompetence) + dbStatement.execute() + } + } + } + } + + fun setLastDate(avatarID: String) { + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + UPDATE tn_avatar + SET Last_Date = ? + WHERE Avatar_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setTimestamp(1, Timestamp.from(Instant.now())) + dbStatement.setString(2, avatarID) + dbStatement.execute() + } + } + } + } + + fun wipeUbuntu(avatarID: String, ubuntuID: String): CompletableFuture { + return logFuture { + pool.connection.use { + it.prepareStatement( + """ + DELETE + FROM tw_ubuntu + WHERE Avatar = ? AND Ubuntu = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, ubuntuID) + dbStatement.execute() + } + } + } + } + + fun wipeBundle(avatarID: String, bundleName: String): CompletableFuture { + return logFuture { + var bundleVariety: BundleVariety? = null + pool.connection.use { + it.prepareStatement( + """ + SELECT Variety + FROM tw_bundle + WHERE Avatar = ? AND Name = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, bundleName) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + bundleVariety = BundleVariety.getBundleVariety(rows.getInt("Variety")) + } + } + } + } + bundleVariety?.let { + pool.connection.use { db -> + db.prepareStatement( + """ + DELETE + FROM tw_bundle + WHERE Avatar = ? AND Name = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, bundleName) + dbStatement.execute() + } + } + FileUtils.deleteQuietly( + TwilightComponent.BUNDLE_ENTRY_PATH.resolve(avatarID).resolve(bundleName + it.fileVariety) + .toFile() + ) + } + } + } + + fun silentSite(siteID: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + DELETE + FROM tw_site + WHERE Site_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, siteID) + dbStatement.execute() + } + } + } + } + + fun getUbuntu(avatarID: String): CompletableFuture>> { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Avatar_ID, Avatar_Name + FROM tw_ubuntu, tn_avatar + WHERE Ubuntu = Avatar_ID AND Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + val data = mutableListOf>() + while (rows.next()) { + data.add(arrayOf(rows.getString("Avatar_ID"), rows.getString("Avatar_Name"))) + } + data + } + } + } + } + } + + fun getAvatarName(avatarID: String): String { + pool.connection.use { + it.prepareStatement( + """ + SELECT Avatar_Name + FROM tn_avatar + WHERE Avatar_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + return if (rows.next()) rows.getString("Avatar_Name") else "" + } + } + } + } + + fun getClearedLevelIDs(avatarID: String): CompletableFuture> { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Level_ID + FROM tw_level + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + val data = mutableListOf() + while (rows.next()) { + data.add(rows.getString("Level_ID")) + } + data + } + } + } + } + } + + fun setWwwLevel(avatarID: String, levelID: String) { + pool.connection.use { + it.prepareStatement( + """ + REPLACE INTO tw_level(Avatar, Level_ID) + VALUES (?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, levelID) + dbStatement.execute() + } + } + } + + fun getSilentSiteCompetence(avatarID: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Silent_Site + FROM tw_avatar + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery() + .use { rows -> + if (rows.next()) { + rows.getInt("Silent_Site") + } else { + QwilightAvatar.SILENT_SITE_CALLABLE + } + } + } + } + } + } + + fun getIOCompetence(avatarID: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT IO_Competence + FROM tw_avatar + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery() + .use { rows -> + if (rows.next()) { + rows.getInt("IO_Competence") + } else { + QwilightAvatar.IO_CALLABLE + } + } + } + } + } + } + + fun getNotifySaveBundle(avatarID: String): Int { + pool.connection.use { + it.prepareStatement( + """ + SELECT Notify_Save_Bundle + FROM tw_avatar + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery() + .use { rows -> return if (rows.next()) rows.getInt("Notify_Save_Bundle") else QwilightAvatar.NOTIFY_SAVE_BUNDLE_CALLABLE } + } + } + } + + fun getConfigure(avatarID: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Silent_Site, Notify_Ubuntu, Default_Bundle_Competence, IO_Competence, Notify_Save_Bundle + FROM tw_avatar + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + intArrayOf( + rows.getInt("Silent_Site"), + rows.getInt("Notify_Ubuntu"), + rows.getInt("Default_Bundle_Competence"), + rows.getInt("IO_Competence"), + rows.getInt("Notify_Save_Bundle") + ) + } else { + intArrayOf( + QwilightAvatar.SILENT_SITE_CALLABLE, + QwilightAvatar.NOTIFY_UBUNTU, + QwilightAvatar.BUNDLE_VOID, + QwilightAvatar.IO_CALLABLE, + QwilightAvatar.NOTIFY_SAVE_BUNDLE_CALLABLE + ) + } + } + } + } + } + } + + fun saveUbuntu(avatarID: String, ubuntuID: String): CompletableFuture { + return logValueFuture { + try { + pool.connection.use { + it.prepareStatement( + """ + INSERT INTO tw_ubuntu + VALUES(?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, Utility.getDefaultAvatarID(avatarID)) + dbStatement.setString(2, Utility.getDefaultAvatarID(ubuntuID)) + dbStatement.execute() + true + } + } + } catch (e: SQLIntegrityConstraintViolationException) { + false + } + } + } + + fun saveBundle( + avatarID: String, bundleName: String, bundleLength: Long, bundleVariety: BundleVariety, etc: String + ) { + pool.connection.use { + it.prepareStatement( + """ + INSERT INTO tw_bundle(Avatar, Name, Length, Competence, Variety, Etc) + VALUES (?, ?, ?, ?, ?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, bundleName) + dbStatement.setLong(3, bundleLength) + dbStatement.setInt( + 4, + if (bundleVariety == BundleVariety.QWILIGHT) QwilightAvatar.BUNDLE_VOID else getDefaultBundleCompetence( + avatarID + ) + ) + dbStatement.setInt(5, bundleVariety.value) + dbStatement.setString(6, etc) + dbStatement.execute() + } + } + } + + private fun getDefaultBundleCompetence(avatarID: String): Int { + pool.connection.use { + it.prepareStatement( + """ + SELECT Default_Bundle_Competence + FROM tw_avatar + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery() + .use { rows -> return if (rows.next()) rows.getInt("Default_Bundle_Competence") else QwilightAvatar.BUNDLE_VOID } + } + } + } + + fun isBundleLengthAvailable(avatarID: String, bundleLength: Long): Boolean { + pool.connection.use { + it.prepareStatement( + """ + SELECT SUM(Length) AS Length + FROM tw_bundle + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery() + .use { rows -> return rows.next() && bundleLength + rows.getLong("Length") < 5000000000 } + } + } + } + + fun hasBundleBefore(avatarID: String, bundleName: String): CompletableFuture { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT * + FROM tw_bundle + WHERE Avatar = ? AND Name = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, bundleName) + dbStatement.executeQuery().use { rows -> + rows.next() + } + } + } + } + } + + fun getLastDate(avatarID: String): Long { + pool.connection.use { dbComponent -> + dbComponent.prepareStatement( + """ + SELECT Last_Date + FROM tn_avatar + WHERE Avatar_ID = ? + """.trimIndent() + ).use { + it.setString(1, avatarID) + it.executeQuery().use { rows -> + return (if (rows.next()) rows.getTimestamp("Last_Date") + .toInstant() else Instant.now()).toEpochMilli() + } + } + } + } + + fun getBundle(avatarID: String, bundleName: String): CompletableFuture?> { + return logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Competence, Variety, Etc, Name + FROM tw_bundle + WHERE Avatar = ? AND Name = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, bundleName) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + arrayOf( + rows.getInt("Competence"), + rows.getInt("Variety"), + rows.getString("Etc"), + rows.getString("Name") + ) + } else { + null + } + } + } + } + } + } + + fun setNote(noteID: String, noteID128: String, noteID256: String, targetComputing: Computing) { + pool.connection.use { + it.prepareStatement( + """ + REPLACE INTO tw_note + VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + """.trimIndent() + ).use { dbStatement -> + val isSalt = targetComputing.isSalt + dbStatement.setString(1, noteID) + dbStatement.setString(2, noteID128) + dbStatement.setString(3, noteID256) + dbStatement.setInt(4, targetComputing.noteVariety.ordinal) + dbStatement.setString(5, targetComputing.artist) + dbStatement.setString(6, targetComputing.title) + dbStatement.setString(7, targetComputing.genre) + dbStatement.setString(8, targetComputing.levelText) + dbStatement.setInt(9, targetComputing.level) + dbStatement.setInt(10, targetComputing.inputMode.ordinal) + dbStatement.setInt(11, targetComputing.totalNotes) + dbStatement.setBoolean(12, isSalt) + dbStatement.setDouble( + 13, + if (isSalt) 0.0 else AbilitySystem.getAbility( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_5K, + noteID128, + noteID256 + ) + ) + dbStatement.setDouble( + 14, + if (isSalt) 0.0 else AbilitySystem.getAbility( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_7K, + noteID128, + noteID256 + ) + ) + dbStatement.setDouble( + 15, + if (isSalt) 0.0 else AbilitySystem.getAbility( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_9K, + noteID128, + noteID256 + ) + ) + dbStatement.setDouble(16, targetComputing.length) + dbStatement.execute() + } + } + } + + fun learnAbility() { + data class NoteID(val noteID: String, val noteID128: String, val noteID256: String, val isSalt: Boolean) + + val noteIDs = mutableListOf() + pool.connection.use { + it.prepareStatement( + """ + SELECT Note_ID, Note_ID_128, Note_ID_256, Is_Salt + FROM tw_note + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + noteIDs.add( + NoteID( + rows.getString("Note_ID"), + rows.getString("Note_ID_128"), + rows.getString("Note_ID_256"), + rows.getBoolean("Is_Salt") + ) + ) + } + } + } + + noteIDs.parallelStream().use { parallel -> + parallel.forEach { (noteID, noteID128, noteID256, isSalt) -> + it.prepareStatement( + """ + UPDATE tw_note + SET Ability_5K = ?, Ability_7K = ?, Ability_9K = ? + WHERE Note_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setDouble( + 1, + if (isSalt) 0.0 else AbilitySystem.getAbility( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_5K, + noteID128, + noteID256 + ) + ) + dbStatement.setDouble( + 2, + if (isSalt) 0.0 else AbilitySystem.getAbility( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_7K, + noteID128, + noteID256 + ) + ) + dbStatement.setDouble( + 3, + if (isSalt) 0.0 else AbilitySystem.getAbility( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_9K, + noteID128, + noteID256 + ) + ) + dbStatement.setString(4, noteID) + dbStatement.execute() + } + } + } + } + } + + fun isCrossUbuntu(avatarID: String, ubuntuID: String): Boolean { + pool.connection.use { + it.prepareStatement( + """ + SELECT * + FROM tw_ubuntu + WHERE Avatar = ? AND Ubuntu = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, ubuntuID) + dbStatement.setString(2, avatarID) + dbStatement.executeQuery().use { rows -> return rows.next() } + } + } + } + + fun getNotifyUbuntu(avatarID: String): Iterable { + pool.connection.use { + it.prepareStatement( + """ + SELECT Ubuntu, Notify_Ubuntu + FROM tw_ubuntu LEFT OUTER JOIN tw_avatar + ON tw_ubuntu.Ubuntu = tw_avatar.Avatar + WHERE tw_ubuntu.Avatar = ? AND Notify_Ubuntu = 0 + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + val data = mutableListOf() + while (rows.next()) { + data.add(rows.getString("Ubuntu")) + } + return data + } + } + } + } + + fun saveSiteYell(siteID: String, siteYell: SiteYell): CompletableFuture { + return logFuture { + pool.connection.use { + it.prepareStatement( + """ + INSERT INTO + tw_site + VALUES(?, ?, ?, ?, ?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, siteID) + dbStatement.setString(2, siteYell.avatarID) + dbStatement.setString(3, siteYell.avatarName) + dbStatement.setLong(4, siteYell.date) + dbStatement.setString(5, siteYell.siteYell) + dbStatement.setLong(6, siteYell.platformID) + dbStatement.execute() + } + } + } + } + + fun doModifySiteYell(siteYell: SiteYell): CompletableFuture { + return logFuture { + pool.connection.use { + it.prepareStatement( + """ + UPDATE tw_site + SET Site_Yell = ? + WHERE Platform_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, siteYell.siteYell) + dbStatement.setLong(2, siteYell.platformID) + dbStatement.execute() + } + } + } + } + + fun wipeSiteYell(siteYell: SiteYell): CompletableFuture { + return logFuture { + pool.connection.use { + it.prepareStatement( + """ + DELETE + FROM tw_site + WHERE Platform_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setLong(1, siteYell.platformID) + dbStatement.execute() + } + } + } + } + + fun saveComment( + multiplier: Double, + autoMode: Int, + noteSaltMode: Int, + audioMultiplier: Double, + faintNoteMode: Int, + judgmentMode: Int, + hitPointsMode: Int, + noteMobilityMode: Int, + longNoteMode: Int, + inputFavorMode: Int, + noteModifyMode: Int, + lowestJudgmentConditionMode: Int, + stand: Int, + band: Int, + isP: Boolean, + point: Double, + salt: Int, + commentID: String, + avatarID: String, + noteID: String, + isPaused: Boolean, + inputFlags: Int + ): Boolean { + var isNewStand = true + pool.connection.use { + it.autoCommit = false + it.prepareStatement( + """ + SELECT Stand + FROM tw_comment + WHERE Note_ID = ? AND Avatar = ? AND Is_Max = true + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next() && rows.getInt("Stand") > stand) { + isNewStand = false + } + } + } + if (isNewStand) { + it.prepareStatement( + """ + UPDATE tw_comment + SET Date = Date, Is_Max = false + WHERE Note_ID = ? AND Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.execute() + } + } + it.prepareStatement( + """ + INSERT INTO tw_comment(Note_ID, Avatar, Multiplier, Auto_Mode, Note_Salt_Mode, Audio_Multiplier, Faint_Note_Mode, Judgment_Mode, Hit_Points_Mode, Note_Mobility_Mode, Long_Note_Mode, Input_Favor_Mode, Note_Modify_Mode, Lowest_Judgment_Condition_Mode, Stand, Band, Is_P, Point, Salt, Comment_ID, Is_Max, Is_Paused, Input_Flags) + VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.setString(2, avatarID) + dbStatement.setDouble(3, multiplier) + dbStatement.setInt(4, autoMode) + dbStatement.setInt(5, noteSaltMode) + dbStatement.setDouble(6, audioMultiplier) + dbStatement.setInt(7, faintNoteMode) + dbStatement.setInt(8, judgmentMode) + dbStatement.setInt(9, hitPointsMode) + dbStatement.setInt(10, noteMobilityMode) + dbStatement.setInt(11, longNoteMode) + dbStatement.setInt(12, inputFavorMode) + dbStatement.setInt(13, noteModifyMode) + dbStatement.setInt(14, lowestJudgmentConditionMode) + dbStatement.setInt(15, stand) + dbStatement.setInt(16, band) + dbStatement.setBoolean(17, isP) + dbStatement.setDouble(18, point) + dbStatement.setInt(19, salt) + dbStatement.setString(20, commentID) + dbStatement.setBoolean(21, isNewStand) + dbStatement.setBoolean(22, isPaused) + dbStatement.setInt(23, inputFlags) + dbStatement.execute() + } + it.commit() + } + return isNewStand + } + + fun getTitle(qm: Map): CompletableFuture { + return logValueFuture { + val avatarID = Utility.getDefaultAvatarID(qm.getOrDefault("avatarID", "")) + val language = qm.getOrDefault("language", "en-US") + pool.connection.use { + it.prepareStatement( + """ + SELECT Title_ID + FROM tw_title + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + val titleID = rows.getString("Title_ID") + if (titleID != null) { + val wwwTitle = TitleSystem.getTitle(language, titleID) + if (wwwTitle != null) { + JSON.TwilightWwwTitle(wwwTitle.title, wwwTitle.titleColor) + } else { + null + } + } else { + null + } + } else { + null + } + } + } + } + } + } + + private fun getLevelIDs(avatarID: String): Collection { + val levelIDs = mutableListOf() + pool.connection.use { + it.prepareStatement( + """ + SELECT Level_ID + FROM tw_level + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + levelIDs.add(rows.getString("Level_ID")) + } + } + } + } + return levelIDs + } + + private fun getNoteIDs(avatarID: String): Collection { + val noteIDs = mutableListOf() + pool.connection.use { + it.prepareStatement( + """ + SELECT DISTINCT Note_ID + FROM tw_comment + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + noteIDs.add(rows.getString("Note_ID")) + } + } + } + } + return noteIDs + } + + fun getTitleItems(avatarID: String): Collection { + return TitleSystem.getTitleItems( + getLevelIDs(avatarID), getNoteIDs(avatarID), getAvatarLevels(avatarID)[0] + ) + } + + fun getTitles(qm: Map): CompletableFuture> { + return logValueFuture { + val avatarID = Utility.getDefaultAvatarID(qm.getOrDefault("avatarID", "")) + TitleSystem.getTitles( + getLevelIDs(avatarID), + getNoteIDs(avatarID), + getAvatarLevels(avatarID)[0], + qm.getOrDefault("language", "en-US") + ) + } + } + + fun getEdgeIDs(qm: Map): CompletableFuture> { + return logValueFuture { + val avatarID = Utility.getDefaultAvatarID(qm.getOrDefault("avatarID", "")) + EdgeSystem.getEdgeIDs( + getLevelIDs(avatarID), getNoteIDs(avatarID), getAvatarLevels(avatarID)[0] + ) + } + } + + fun setAvatarEdge(avatarID: String, edgeID: String): CompletableFuture { + return logFuture { + pool.connection.use { + if ( + EdgeSystem.getEdgeIDs( + getLevelIDs(avatarID), getNoteIDs(avatarID), getAvatarLevels(avatarID)[0] + ).contains(edgeID) + ) { + it.prepareStatement( + """ + REPLACE INTO tw_edge + VALUES(?, ?) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, edgeID) + dbStatement.execute() + } + } + } + } + } + + fun getAvatarEdge(avatarID: String): String { + pool.connection.use { + it.prepareStatement( + """ + SELECT Edge_ID + FROM tw_edge + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery() + .use { rows -> return if (rows.next()) rows.getString("Edge_ID") else "Default" } + } + } + } + + fun getNote(qm: Map): CompletableFuture { + return logValueFuture { + val noteVariety = (qm["noteVariety"] ?: "0").toInt() + val want = (qm["want"] ?: "").replace("%".toRegex(), "\\\\%").replace("_".toRegex(), "\\\\_") + val src = qm["src"] ?: "0" + val fit = qm["fit"] ?: "0" + val page = (qm["page"] ?: "1").toInt() + val viewUnit = (qm["viewUnit"] ?: "15").toInt() + + var totalCount = 0 + var highestCount = 0 + var noteCount = 0 + val notes = mutableListOf() + + pool.connection.use { db -> + val isNotWant = want.isEmpty() + val noteVarietyStatement = if (noteVariety > 0) "Note_Variety = $noteVariety" else null + val noteVarietyStatement0 = if (noteVarietyStatement != null) " WHERE $noteVarietyStatement" else " " + val noteVarietyStatement1 = if (noteVarietyStatement != null) " AND $noteVarietyStatement" else " " + if (isNotWant) { + db.prepareStatement( + """ + SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT tw_note.Note_ID, Avatar) AS Highest_Count, COUNT(DISTINCT tw_note.Note_ID) AS Note_Count + FROM tw_note, tw_comment + WHERE tw_note.Note_ID = tw_comment.Note_ID + $noteVarietyStatement1 + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + totalCount = rows.getInt("Total_Count") + highestCount = rows.getInt("Highest_Count") + noteCount = rows.getInt("Note_Count") + } + } + } + } else { + db.prepareStatement( + when (src) { + "0" -> """ + SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT tw_note.Note_ID, Avatar) AS Highest_Count, COUNT(DISTINCT tw_note.Note_ID) AS Note_Count + FROM tw_note, tw_comment + WHERE tw_note.Note_ID = tw_comment.Note_ID AND Title LIKE ? ESCAPE "\\" + """.trimIndent() + + "1" -> """ + SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT tw_note.Note_ID, Avatar) AS Highest_Count, COUNT(DISTINCT tw_note.Note_ID) AS Note_Count + FROM tw_note, tw_comment, tn_avatar + WHERE tw_note.Note_ID = tw_comment.Note_ID AND Avatar = Avatar_ID AND Avatar_Name LIKE ? ESCAPE "\\" + """.trimIndent() + + "2" -> """ + SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT tw_note.Note_ID, Avatar) AS Highest_Count, COUNT(DISTINCT tw_note.Note_ID) AS Note_Count + FROM tw_note, tw_comment + WHERE tw_note.Note_ID = tw_comment.Note_ID AND Artist LIKE ? ESCAPE "\\" + """.trimIndent() + + "3" -> """ + SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT tw_note.Note_ID, Avatar) AS Highest_Count, COUNT(DISTINCT tw_note.Note_ID) AS Note_Count + FROM tw_note, tw_comment + WHERE tw_note.Note_ID = tw_comment.Note_ID AND Genre LIKE ? ESCAPE "\\" + """.trimIndent() + + else -> null + } + noteVarietyStatement1 + ).use { dbStatement -> + if (dbStatement != null) { + dbStatement.setString(1, "%$want%") + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + totalCount = rows.getInt("Total_Count") + highestCount = rows.getInt("Highest_Count") + noteCount = rows.getInt("Note_Count") + } + } + } + } + } + val asStatement = """ + DISTINCT tw_note.Note_ID, Note_Variety, Artist, Title, Genre, tw_note.Level_Text, tw_note.Level, ( + SELECT COUNT(DISTINCT Note_ID, Avatar) + FROM tw_comment + WHERE tw_note.Note_ID = tw_comment.Note_ID + ) AS Highest, ( + SELECT COUNT(Comment_ID) + FROM tw_comment + WHERE tw_note.Note_ID = tw_comment.Note_ID + ) AS Total, ( + SELECT MAX(Date) + FROM tw_comment + WHERE tw_note.Note_ID = tw_comment.Note_ID + ) AS Date + """.trimIndent() + val fitStatement = when (fit) { + "0" -> " ORDER BY Highest DESC " + "1" -> " ORDER BY Total DESC " + "2" -> " ORDER BY Date DESC " + "3" -> " ORDER BY Title " + "4" -> " ORDER BY Artist " + "5" -> " ORDER BY Genre " + "6" -> " ORDER BY Level_Text " + else -> " " + } + val dbStatement: PreparedStatement? + if (isNotWant) { + dbStatement = db.prepareStatement( + "SELECT $asStatement FROM tw_note $noteVarietyStatement0 $fitStatement LIMIT ?, ?" + ) + dbStatement.setInt(1, viewUnit * (page - 1)) + dbStatement.setInt(2, viewUnit) + } else { + dbStatement = when (src) { + "0" -> db.prepareStatement( + """ + SELECT $asStatement + FROM tw_note + WHERE Title LIKE ? ESCAPE "\\" $noteVarietyStatement1 $fitStatement LIMIT ?, ? + """.trimIndent() + ) + + "1" -> db.prepareStatement( + """ + SELECT $asStatement + FROM tw_note, tw_comment, tn_avatar + WHERE tw_note.Note_ID = tw_comment.Note_ID AND Avatar = Avatar_ID AND Avatar_Name LIKE ? ESCAPE "\\" $noteVarietyStatement1 $fitStatement LIMIT ?, ? + """.trimIndent() + ) + + "2" -> db.prepareStatement( + """ + SELECT $asStatement + FROM tw_note + WHERE Artist LIKE ? ESCAPE "\\" $noteVarietyStatement1 $fitStatement LIMIT ?, ? + """.trimIndent() + ) + + "3" -> db.prepareStatement( + """ + SELECT $asStatement + FROM tw_note + WHERE Genre LIKE ? ESCAPE "\\" $noteVarietyStatement1 $fitStatement LIMIT ?, ? + """.trimIndent() + ) + + else -> null + } + dbStatement?.setString(1, "%$want%") + dbStatement?.setInt(2, viewUnit * (page - 1)) + dbStatement?.setInt(3, viewUnit) + } + dbStatement?.use { + it.executeQuery().use { rows -> + while (rows.next()) { + notes.add(object { + val noteID = rows.getString("Note_ID") + val noteVariety = rows.getInt("Note_Variety") + val artist = rows.getString("Artist") + val title = rows.getString("Title") + val genre = rows.getString("Genre") + val levelText = rows.getString("Level_Text") + val level = rows.getInt("Level") + val highestCount = rows.getInt("Highest") + val totalCount = rows.getInt("Total") + val date = rows.getTimestamp("Date") + }) + } + } + } + + object { + val totalCount = totalCount + val highestCount = highestCount + val noteCount = noteCount + val notes = notes + } + } + } + } + + fun getLevels(levelGroup: LevelSystem.LevelGroup): CompletableFuture> { + return logValueFuture { + levelGroup.levelItems.mapNotNull { levelItem -> + pool.connection.use { + it.prepareStatement( + """ + SELECT COUNT(Avatar) AS Count + FROM tw_level + WHERE Level_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, levelItem.levelID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + object { + val levelID = levelItem.levelID + val title = levelItem.title + val comment = levelItem.comment + val levelText = levelItem.levelText + val level = levelItem.level + val avatars = rows.getInt("Count") + } + } else { + null + } + } + } + } + } + } + } + + fun getLevelNote(levelItem: LevelSystem.LevelGroup.LevelItem): CompletableFuture> { + return logValueFuture { + levelItem.noteID.split("/".toRegex()).map { noteID -> + pool.connection.use { + it.prepareStatement( + """ + SELECT Note_ID, Note_Variety, Artist, Title, Genre, Level_Text, Level + FROM tw_note + WHERE Note_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, noteID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + object { + val noteID = rows.getString("Note_ID") + val noteVariety = rows.getInt("Note_Variety") + val artist = rows.getString("Artist") + val title = rows.getString("Title") + val genre = rows.getString("Genre") + val levelText = rows.getString("Level_Text") + val level = rows.getInt("Level") + } + } else { + object { + val noteID = noteID + val noteVariety = Component.NoteVariety.EVENT_NOTE.ordinal + val artist = null + val title = null + val genre = null + val levelText = null + val level = 0 + } + } + } + } + } + } + } + } + + fun getAvatarLevels(avatarID: String): IntArray { + pool.connection.use { + it.prepareStatement( + """ + SELECT SUM(Total_Notes * Stand / 1000000) AS Value + FROM tw_comment, tw_note + WHERE Avatar = ? AND tw_comment.Note_ID = tw_note.Note_ID AND Is_Salt = false + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + val value = if (rows.next()) rows.getDouble("Value") else 0.0 + return intArrayOf(1 + (value / 10000).toInt(), (value % 10000).toInt(), 10000) + } + } + } + } + + fun getAvatar(qm: Map): CompletableFuture { + return logValueFuture { + val wantAvatarID = Utility.getDefaultAvatarID(qm.getOrDefault("avatarID", "")) + val wantAvatarName = qm.getOrDefault("avatarName", "") + + var avatarID = "" + var avatarName = "" + var avatarIntro = "" + var totalCount = 0 + var totalLength = 0.0 + var highestCount = 0 + var date = 0L + var avatarLevels = intArrayOf() + val avatarAbility5K: Double + val avatarAbility5KClass: Double + val avatarAbility5KPlace: Int + val avatarAbility5KCount: Int + val avatarAbility7K: Double + val avatarAbility7KClass: Double + val avatarAbility7KPlace: Int + val avatarAbility7KCount: Int + val avatarAbility9K: Double + val avatarAbility9KClass: Double + val avatarAbility9KPlace: Int + val avatarAbility9KCount: Int + val levels = mutableListOf() + val lasts = mutableListOf() + val favorites = mutableListOf() + val dateSet = mutableListOf() + val dateValues = mutableListOf() + val quitStatusValues = IntArray(7) + val abilities5K = mutableListOf() + val abilities7K = mutableListOf() + val abilities9K = mutableListOf() + + val wantAvatars = mutableListOf() + + pool.connection.use { db -> + if (wantAvatarID.isEmpty()) { + db.prepareStatement( + """ + SELECT Avatar_ID, Avatar_Name, Avatar_Intro + FROM tn_avatar + WHERE Avatar_Name LIKE ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, "%$wantAvatarName%") + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + wantAvatars.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val avatarIntro = rows.getString("Avatar_Intro") + + override fun toString(): String { + return this.avatarID + } + }) + } + avatarID = wantAvatars.singleOrNull()?.toString() ?: "" + } + } + } else { + db.prepareStatement( + """ + SELECT Avatar_ID + FROM tn_avatar + WHERE Avatar_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, wantAvatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + avatarID = rows.getString("Avatar_ID") + } + } + } + } + } + + if (avatarID.isEmpty()) { + if (wantAvatars.isEmpty()) { + null + } else { + wantAvatars + } + } else { + val futures = CompletableFuture.allOf(logValueFuture { + avatarLevels = getAvatarLevels(avatarID) + }, logValueFuture { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT COUNT(Comment_ID) AS Total_Count, COUNT(DISTINCT Note_ID) AS Highest_Count, Avatar_ID, Avatar_Name, Avatar_Intro, Last_Date + FROM tn_avatar, tw_comment + WHERE Avatar_ID = tw_comment.Avatar AND Avatar_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + totalCount = rows.getInt("Total_Count") + highestCount = rows.getInt("Highest_Count") + avatarName = rows.getString("Avatar_Name") + avatarIntro = rows.getString("Avatar_Intro") + date = rows.getTimestamp("Last_Date")?.toInstant()?.toEpochMilli() ?: 0 + } + } + } + } + }, logValueFuture { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT SUM(Length) AS Total_Length + FROM tn_avatar, tw_comment, tw_note + WHERE Avatar_ID = tw_comment.Avatar AND tw_comment.Note_ID = tw_note.Note_ID AND Avatar_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + if (rows.next()) { + totalLength = rows.getDouble("Total_Length") + } + } + } + } + }, logValueFuture { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT Level_ID, Date + FROM tw_level + WHERE Avatar = ? + ORDER BY Date DESC + """.trimIndent() + ).use { + it.setString(1, avatarID) + it.executeQuery().use { rows -> + while (rows.next()) { + LevelSystem.getLevelItem(rows.getString("Level_ID"))?.let { levelItem -> + levels.add(object { + val levelID = levelItem.levelID + val title = levelItem.title + val levelText = levelItem.levelText + val level = levelItem.level + val date = rows.getTimestamp("Date") + }) + } + } + } + } + } + }, logValueFuture { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT MAX(Date) AS Date, tw_note.Note_ID, Note_Variety, Title, Artist, Genre, tw_note.Level_Text, Level + FROM tw_comment, tw_note + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = ? + GROUP BY tw_note.Note_ID + ORDER BY Date DESC + LIMIT 10 + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { + while (it.next()) { + lasts.add(object { + val noteID = it.getString("Note_ID") + val noteVariety = it.getInt("Note_Variety") + val artist = it.getString("Artist") + val title = it.getString("Title") + val genre = it.getString("Genre") + val levelText = it.getString("Level_Text") + val level = it.getInt("Level") + val date = it.getTimestamp("Date") + }) + } + } + } + } + }, logValueFuture { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT tw_note.Note_ID, Note_Variety, Title, Artist, Genre, tw_note.Level_Text, Level, COUNT(Comment_ID) AS Count + FROM tw_comment, tw_note + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = ? + GROUP BY tw_note.Note_ID + ORDER BY COUNT DESC + LIMIT 10 + """.trimIndent() + ).use { + it.setString(1, avatarID) + it.executeQuery().use { rows -> + while (rows.next()) { + favorites.add(object { + val noteID = rows.getString("Note_ID") + val noteVariety = rows.getInt("Note_Variety") + val artist = rows.getString("Artist") + val title = rows.getString("Title") + val genre = rows.getString("Genre") + val levelText = rows.getString("Level_Text") + val level = rows.getInt("Level") + val totalCount = rows.getInt("Count") + }) + } + } + } + } + }, logValueFuture { + pool.connection.use { db -> + val highestDateValue = System.currentTimeMillis() + for (i in 90 downTo 0) { + dateSet.add(highestDateValue - 86400000L * i) + db.prepareStatement( + """ + SELECT COUNT(Comment_ID) AS Count + FROM tw_comment + WHERE Avatar = ? AND DATE_FORMAT(Date, "%Y-%m-%d") = ? + """.trimIndent() + ).use { + it.setString(1, avatarID) + it.setString( + 2, yyyyMMDDFormat.format( + Instant.ofEpochMilli(highestDateValue - 86400000L * i) + .atZone(ZoneId.systemDefault()) + ) + ) + it.executeQuery().use { rows -> + if (rows.next()) { + dateValues.add(rows.getInt("Count")) + } + } + } + } + } + }, logValueFuture { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT Note_ID, Stand, Point + FROM tw_comment + WHERE Avatar = ? AND Is_Max = true + """.trimIndent() + ).use { + it.setString(1, avatarID) + it.executeQuery().use { rows -> + while (rows.next()) { + ++quitStatusValues[Utility.getQuitStatusValue( + rows.getDouble("Point"), rows.getInt("Stand") + )] + } + } + } + } + }) + + val rawAbilities5K = getAbilities5K() + val targetAbilities5K = getAbilities(rawAbilities5K).toList() + val validAbilities5K = targetAbilities5K.stream().filter { it.second.second }.toList() + val targetAbility5K = + targetAbilities5K.stream().filter { it.first.first == avatarID }.findAny().orElse( + Pair(Pair(avatarID, avatarName), Pair(0.0, false)) + ) + avatarAbility5K = targetAbility5K.second.first + avatarAbility5KPlace = validAbilities5K.indexOf(targetAbility5K) + avatarAbility5KCount = validAbilities5K.size + avatarAbility5KClass = if (avatarAbility5KPlace != -1) { + val absTargetAbilityPlace = 10.0 + if (avatarAbility5KPlace < absTargetAbilityPlace) { + -(avatarAbility5KPlace + 1).toDouble() + } else { + (avatarAbility5KPlace - absTargetAbilityPlace) / (avatarAbility5KCount - absTargetAbilityPlace) + } + } else { + 1.0 + } + abilities5K.addAll( + (rawAbilities5K.entries.singleOrNull { it.key.first == avatarID } ?: AbstractMap.SimpleEntry( + Pair(avatarID, avatarName), + ArrayList() + )).value.sortedByDescending { it.ability } + ) + + val rawAbilities7K = getAbilities7K() + val targetAbilities7K = getAbilities(rawAbilities7K).toList() + val validAbilities7K = targetAbilities7K.stream().filter { it.second.second }.toList() + val targetAbility7K = + targetAbilities7K.stream().filter { it.first.first == avatarID }.findAny().orElse( + Pair(Pair(avatarID, avatarName), Pair(0.0, false)) + ) + avatarAbility7K = targetAbility7K.second.first + avatarAbility7KPlace = validAbilities7K.indexOf(targetAbility7K) + avatarAbility7KCount = validAbilities7K.size + avatarAbility7KClass = if (avatarAbility7KPlace != -1) { + val absTargetAbilityPlace = 10.0 + if (avatarAbility7KPlace < absTargetAbilityPlace) { + -(avatarAbility7KPlace + 1).toDouble() + } else { + (avatarAbility7KPlace - absTargetAbilityPlace) / (avatarAbility7KCount - absTargetAbilityPlace) + } + } else { + 1.0 + } + abilities7K.addAll( + (rawAbilities7K.entries.singleOrNull { it.key.first == avatarID } ?: AbstractMap.SimpleEntry( + Pair(avatarID, avatarName), + ArrayList() + )).value.sortedByDescending { it.ability } + ) + + val rawAbilities9K = getAbilities9K() + val targetAbilities9K = getAbilities(rawAbilities9K).toList() + val validAbilities9K = targetAbilities9K.stream().filter { it.second.second }.toList() + val targetAbility9K = + targetAbilities9K.stream().filter { it.first.first == avatarID }.findAny().orElse( + Pair(Pair(avatarID, avatarName), Pair(0.0, false)) + ) + avatarAbility9K = targetAbility9K.second.first + avatarAbility9KPlace = validAbilities9K.indexOf(targetAbility9K) + avatarAbility9KCount = validAbilities9K.size + avatarAbility9KClass = if (avatarAbility9KPlace != -1) { + val absTargetAbilityPlace = 10.0 + if (avatarAbility9KPlace < absTargetAbilityPlace) { + -(avatarAbility9KPlace + 1).toDouble() + } else { + (avatarAbility9KPlace - absTargetAbilityPlace) / (avatarAbility9KCount - absTargetAbilityPlace) + } + } else { + 1.0 + } + abilities9K.addAll( + (rawAbilities9K.entries.singleOrNull { it.key.first == avatarID } ?: AbstractMap.SimpleEntry( + Pair(avatarID, avatarName), + ArrayList() + )).value.sortedByDescending { it.ability } + ) + + futures.join() + + object { + var avatarID = avatarID + val avatarName = avatarName + val avatarIntro = avatarIntro + val totalCount = totalCount + val totalLength = totalLength + val highestCount = highestCount + val date = date + val avatarLevels = avatarLevels + val avatarAbility5K = avatarAbility5K + val avatarAbility5KClass = avatarAbility5KClass + val avatarAbility5KPlace = avatarAbility5KPlace + 1 + val avatarAbility5KCount = avatarAbility5KCount + val avatarAbility7K = avatarAbility7K + val avatarAbility7KClass = avatarAbility7KClass + val avatarAbility7KPlace = avatarAbility7KPlace + 1 + val avatarAbility7KCount = avatarAbility7KCount + val avatarAbility9K = avatarAbility9K + val avatarAbility9KClass = avatarAbility9KClass + val avatarAbility9KPlace = avatarAbility9KPlace + 1 + val avatarAbility9KCount = avatarAbility9KCount + val levels = levels + val lasts = lasts + val favorites = favorites + val dateSet = dateSet + val dateValues = dateValues + val quitStatusValues = quitStatusValues + val abilities5K = abilities5K + val abilities7K = abilities7K + val abilities9K = abilities9K + } + } + } + } + + private fun getAbilities5K(): Map, MutableCollection> { + val abilities5K = mutableMapOf, MutableCollection>() + pool.connection.use { + it.prepareStatement( + """ + SELECT tw_note.Note_ID, Note_Variety, Artist, Title, Genre, Level_Text, tw_note.Level, Stand, Avatar_ID, Avatar_Name, Ability_5K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value + FROM tw_comment, tw_note, tn_avatar + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = Avatar_ID AND Is_Max = true AND (Judgment_Mode = 1 OR Judgment_Mode = 2 OR Judgment_Mode = 4) AND (Hit_Points_Mode = 1 OR Hit_Points_Mode = 2 OR Hit_Points_Mode = 5) AND (Input_Favor_Mode = 0 OR Input_Favor_Mode = 5 OR Input_Favor_Mode = 10) AND Ability_5K > 0.0 + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + val abilities = abilities5K.computeIfAbsent( + Pair(rows.getString("Avatar_ID"), rows.getString("Avatar_Name")) + ) { ArrayList() } + if (abilities.size < 50) { + abilities.add(JSON.TwilightWwwAvatarAbility(rows, 0.95.pow(abilities.size.toDouble()))) + } + } + } + } + } + return abilities5K + } + + fun getAvatarAbility5K(avatarID: String): Double { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT Ability_5K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value + FROM tw_comment, tw_note, tn_avatar + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = Avatar_ID AND Is_Max = true AND Avatar = ? AND (Judgment_Mode = 1 OR Judgment_Mode = 2 OR Judgment_Mode = 4) AND (Hit_Points_Mode = 1 OR Hit_Points_Mode = 2 OR Hit_Points_Mode = 5) AND (Input_Favor_Mode = 0 OR Input_Favor_Mode = 5 OR Input_Favor_Mode = 10) AND Ability_5K > 0.0 + ORDER BY Value DESC + LIMIT 50 + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + val abilities = mutableListOf() + while (rows.next()) { + abilities.add(rows.getDouble("Value") * 0.95.pow(abilities.size.toDouble())) + } + return abilities.sumOf { it } + } + } + } + } + + private fun getAbilities7K(): Map, MutableCollection> { + val abilities7K = mutableMapOf, MutableCollection>() + pool.connection.use { + it.prepareStatement( + """ + SELECT tw_note.Note_ID, Note_Variety, Artist, Title, Genre, Level_Text, tw_note.Level, Stand, Avatar_ID, Avatar_Name, Ability_7K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value + FROM tw_comment, tw_note, tn_avatar + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = Avatar_ID AND Is_Max = true AND (Judgment_Mode = 1 OR Judgment_Mode = 2 OR Judgment_Mode = 4) AND (Hit_Points_Mode = 1 OR Hit_Points_Mode = 2 OR Hit_Points_Mode = 5) AND (Input_Favor_Mode = 0 OR Input_Favor_Mode = 7 OR Input_Favor_Mode = 11) AND Ability_7K > 0.0 + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + val abilities = abilities7K.computeIfAbsent( + Pair(rows.getString("Avatar_ID"), rows.getString("Avatar_Name")) + ) { ArrayList() } + if (abilities.size < 50) { + abilities.add(JSON.TwilightWwwAvatarAbility(rows, 0.95.pow(abilities.size.toDouble()))) + } + } + } + } + } + return abilities7K + } + + fun getAvatarAbility7K(avatarID: String): Double { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT Ability_7K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value + FROM tw_comment, tw_note, tn_avatar + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = Avatar_ID AND Is_Max = true AND Avatar = ? AND (Judgment_Mode = 1 OR Judgment_Mode = 2 OR Judgment_Mode = 4) AND (Hit_Points_Mode = 1 OR Hit_Points_Mode = 2 OR Hit_Points_Mode = 5) AND (Input_Favor_Mode = 0 OR Input_Favor_Mode = 7 OR Input_Favor_Mode = 11) AND Ability_7K > 0.0 + ORDER BY Value DESC + LIMIT 50 + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + val abilities = mutableListOf() + while (rows.next()) { + abilities.add(rows.getDouble("Value") * 0.95.pow(abilities.size.toDouble())) + } + return abilities.sumOf { it } + } + } + } + } + + private fun getAbilities9K(): Map, MutableCollection> { + val abilities5K = mutableMapOf, MutableCollection>() + pool.connection.use { + it.prepareStatement( + """ + SELECT tw_note.Note_ID, Note_Variety, Artist, Title, Genre, Level_Text, tw_note.Level, Stand, Avatar_ID, Avatar_Name, Ability_9K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value + FROM tw_comment, tw_note, tn_avatar + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = Avatar_ID AND Is_Max = true AND (Judgment_Mode = 1 OR Judgment_Mode = 2 OR Judgment_Mode = 4) AND (Hit_Points_Mode = 1 OR Hit_Points_Mode = 2 OR Hit_Points_Mode = 5) AND (Input_Favor_Mode = 0 OR Input_Favor_Mode = 9) AND Ability_9K > 0.0 + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + val abilities = abilities5K.computeIfAbsent( + Pair(rows.getString("Avatar_ID"), rows.getString("Avatar_Name")) + ) { ArrayList() } + if (abilities.size < 50) { + abilities.add(JSON.TwilightWwwAvatarAbility(rows, 0.95.pow(abilities.size.toDouble()))) + } + } + } + } + } + return abilities5K + } + + fun getAvatarAbility9K(avatarID: String): Double { + pool.connection.use { db -> + db.prepareStatement( + """ + SELECT Ability_9K * (POWER(Stand / 1000000, 3) - 0.5 * POWER(Stand / 1000000, 2) + 0.5 * (Stand / 1000000)) AS Value + FROM tw_comment, tw_note, tn_avatar + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = Avatar_ID AND Is_Max = true AND Avatar = ? AND (Judgment_Mode = 1 OR Judgment_Mode = 2 OR Judgment_Mode = 4) AND (Hit_Points_Mode = 1 OR Hit_Points_Mode = 2 OR Hit_Points_Mode = 5) AND (Input_Favor_Mode = 0 OR Input_Favor_Mode = 9) AND Ability_9K > 0.0 + ORDER BY Value DESC + LIMIT 50 + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + val abilities = mutableListOf() + while (rows.next()) { + abilities.add(rows.getDouble("Value") * 0.95.pow(abilities.size.toDouble())) + } + return abilities.sumOf { it } + } + } + } + } + + private fun getAbilities(abilities: Map, MutableCollection>): Stream, Pair>> { + return abilities.entries.stream().map { (avatar, abilities) -> + Pair( + avatar, Pair( + abilities.sumOf { it.ability }, !abilities.isEmpty() + ) + ) + }.sorted { o1, o2 -> + val value = o2.second.first - o1.second.first + if (value > 0) { + 1 + } else if (value < 0) { + -1 + } else { + 0 + } + } + } + + fun getWow(): CompletableFuture { + val totalAvatars = mutableListOf() + val totalAvatarsAt = mutableListOf() + val highestAvatars = mutableListOf() + val highestAvatarsAt = mutableListOf() + val standAvatars = mutableListOf() + val standAvatarsAt = mutableListOf() + val bandAvatars = mutableListOf() + val bandAvatarsAt = mutableListOf() + val ability5KAvatars = mutableListOf() + val ability7KAvatars = mutableListOf() + val ability9KAvatars = mutableListOf() + val levelAvatars = mutableListOf() + val levyingDate = yyyyMMDDFormat.format(LocalDate.now().withDayOfMonth(1)) + val defaultFilter = "WHERE Avatar = tn_avatar.Avatar_ID" + val dateStatement = "AND '$levyingDate' <= tw_comment.Date" + fun getTotalAvatarsStatement(filter: String): String { + return """ + SELECT Avatar_ID, Avatar_Name, COUNT(tw_comment.Note_ID) AS Value + FROM tw_comment, tn_avatar + $filter + GROUP BY Avatar_ID + ORDER BY Value DESC + LIMIT 10 + """.trimIndent() + } + + fun getHighestAvatarsStatement(filter: String): String { + return """ + SELECT Avatar_ID, Avatar_Name, COUNT(DISTINCT tw_comment.Note_ID) AS Value + FROM tw_comment, tn_avatar + $filter + GROUP BY Avatar_ID + ORDER BY Value DESC + LIMIT 10 + """.trimIndent() + } + + fun getStandAvatarsStatement(filter: String): String { + return """ + SELECT Avatar_ID, Avatar_Name, SUM(Stand) AS Value + FROM tw_comment, tn_avatar + $filter AND Is_Max = true + GROUP BY Avatar_ID + ORDER BY Value DESC + LIMIT 10 + """.trimIndent() + } + + fun getBandAvatarsStatement(filter: String): String { + return """ + SELECT Avatar_ID, Avatar_Name, MAX(Band) AS Value + FROM tw_comment, tn_avatar + $filter + GROUP BY Avatar_ID + ORDER BY Value DESC + LIMIT 10 + """.trimIndent() + } + + return CompletableFuture.allOf( + logValueFuture { + pool.connection.use { + it.prepareStatement(getTotalAvatarsStatement(defaultFilter)).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + totalAvatars.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement(getTotalAvatarsStatement("$defaultFilter $dateStatement")) + .use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + totalAvatarsAt.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement(getHighestAvatarsStatement(defaultFilter)).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + highestAvatars.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + getHighestAvatarsStatement( + "$defaultFilter $dateStatement AND Is_Max = true" + ) + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + highestAvatarsAt.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement(getStandAvatarsStatement(defaultFilter)).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + standAvatars.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement(getStandAvatarsStatement("$defaultFilter $dateStatement")) + .use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + standAvatarsAt.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement(getBandAvatarsStatement(defaultFilter)).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + bandAvatars.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement(getBandAvatarsStatement("$defaultFilter $dateStatement")) + .use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + bandAvatarsAt.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + }, + logValueFuture { + ability5KAvatars.addAll(getAbilities(getAbilities5K()).limit(50).map { (avatar, abilities) -> + object { + val avatarID = avatar.first + val avatarName = avatar.second + val value = abilities.first + } + }.toList()) + }, + logValueFuture { + ability7KAvatars.addAll(getAbilities(getAbilities7K()).limit(50).map { (avatar, abilities) -> + object { + val avatarID = avatar.first + val avatarName = avatar.second + val value = abilities.first + } + }.toList()) + }, + logValueFuture { + ability9KAvatars.addAll(getAbilities(getAbilities9K()).limit(50).map { (avatar, abilities) -> + object { + val avatarID = avatar.first + val avatarName = avatar.second + val value = abilities.first + } + }.toList()) + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Avatar_ID, Avatar_Name, 1 + SUM(Total_Notes * Stand / 1000000 / 10000) AS Value + FROM tw_comment, tw_note, tn_avatar + WHERE tw_comment.Note_ID = tw_note.Note_ID AND Avatar = Avatar_ID AND Is_Salt = false + GROUP BY Avatar_ID + ORDER BY Value DESC + LIMIT 50 + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + levelAvatars.add(object { + val avatarID = rows.getString("Avatar_ID") + val avatarName = rows.getString("Avatar_Name") + val value = rows.getLong("Value") + }) + } + } + } + } + } + ).thenApply { + object { + val totalAvatars = totalAvatars + val totalAvatarsAt = totalAvatarsAt + val highestAvatars = highestAvatars + val highestAvatarsAt = highestAvatarsAt + val standAvatars = standAvatars + val standAvatarsAt = standAvatarsAt + val bandAvatars = bandAvatars + val bandAvatarsAt = bandAvatarsAt + val ability5KAvatars = ability5KAvatars + val ability7KAvatars = ability7KAvatars + val ability9KAvatars = ability9KAvatars + val levelAvatars = levelAvatars + } + } + } + + fun getEtc(language: String): CompletableFuture { + val totalDateSet = mutableListOf() + val totalDateValues = mutableListOf() + val signUpDateSet = mutableListOf() + val signUpDateValues = mutableListOf() + val avatarDateSet = mutableListOf() + val avatarDateValues = mutableListOf() + val totalNoteFileValues = mutableListOf() + val totalTitleValues = mutableListOf() + val totalEdgeValues = mutableListOf() + val favoriteNoteFileValues = mutableListOf() + val favoriteNoteFileAtValues = mutableListOf() + val inputModeValues = mutableListOf() + val autoModeValues = mutableListOf() + val noteSaltModeValues = mutableListOf() + val faintNoteModeValues = mutableListOf() + val judgmentModeValues = mutableListOf() + val hitPointsModeValues = mutableListOf() + val noteMobilityModeValues = mutableListOf() + val longNoteModeValues = mutableListOf() + val inputFavorModeValues = mutableListOf() + val noteModifyModeValues = mutableListOf() + val lowestJudgmentConditionModeValues = mutableListOf() + + return CompletableFuture.allOf( + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT DATE_FORMAT(Date, "%Y-%m") AS Etc_Date, COUNT(*) AS Value + FROM tw_comment + GROUP BY Etc_Date + HAVING Etc_Date != "0000-00" + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + totalDateSet.add(rows.getString("Etc_Date")) + totalDateValues.add(rows.getInt("Value")) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT DATE_FORMAT(Date, "%Y-%m") AS Etc_Date, COUNT(*) AS Value + FROM tn_avatar + GROUP BY Etc_Date + HAVING Etc_Date != "0000-00" + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + signUpDateSet.add(rows.getString("Etc_Date")) + signUpDateValues.add(rows.getInt("Value")) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT DATE_FORMAT(Date, "%Y-%m") AS Etc_Date, COUNT(DISTINCT Avatar) AS Value + FROM tw_comment + GROUP BY Etc_Date + HAVING Etc_Date != "0000-00" + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + avatarDateSet.add(rows.getString("Etc_Date")) + avatarDateValues.add(rows.getInt("Value")) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT tw_comment.Note_ID, Title, Artist, Genre, Level, Level_Text, COUNT(tw_comment.Note_ID) AS Value + FROM tw_note, tw_comment + WHERE tw_note.Note_ID = tw_comment.Note_ID AND DATE_FORMAT(Date, "%Y-%m") = ? + GROUP BY tw_comment.Note_ID + ORDER BY Value DESC + LIMIT 10; + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, yyyyMMFormat.format(Instant.now())) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + totalNoteFileValues.add(object { + val noteID = rows.getString("Note_ID") + val title = rows.getString("Title") + val artist = rows.getString("Artist") + val genre = rows.getString("Genre") + val level = rows.getInt("Level") + val levelText = rows.getString("Level_Text") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Title_ID, COUNT(Title_ID) AS Value + FROM tw_title + GROUP BY Title_ID + ORDER BY Value DESC + LIMIT 10; + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + val wwwTitle = TitleSystem.getTitle(language, rows.getString("Title_ID")) + if (wwwTitle != null) { + totalTitleValues.add(object { + val title = wwwTitle.title + val titleColor = wwwTitle.titleColor + val value = rows.getInt("Value") + }) + } + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Edge_ID, COUNT(Edge_ID) AS Value + FROM tw_edge + WHERE Edge_ID != "Default" + GROUP BY Edge_ID + ORDER BY Value DESC + LIMIT 10; + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + totalEdgeValues.add(object { + val edge = + Base64.getEncoder() + .encodeToString(EdgeSystem.getDrawing(rows.getString("Edge_ID"))) + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT tw_favor.Note_ID, Title, Artist, Genre, Level, Level_Text, SUM(2 * Favor - 1) AS Value + FROM tw_note, tw_favor + WHERE tw_note.Note_ID = tw_favor.Note_ID + GROUP BY tw_favor.Note_ID + ORDER BY Value DESC + LIMIT 10; + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + favoriteNoteFileValues.add(object { + val noteID = rows.getString("Note_ID") + val title = rows.getString("Title") + val artist = rows.getString("Artist") + val genre = rows.getString("Genre") + val level = rows.getInt("Level") + val levelText = rows.getString("Level_Text") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT tw_favor.Note_ID, Title, Artist, Genre, Level, Level_Text, SUM(2 * Favor - 1) AS Value + FROM tw_note, tw_favor + WHERE tw_note.Note_ID = tw_favor.Note_ID AND DATE_FORMAT(Date, "%Y-%m") = ? + GROUP BY tw_favor.Note_ID + ORDER BY Value DESC + LIMIT 10; + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, yyyyMMFormat.format(Instant.now())) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + favoriteNoteFileAtValues.add(object { + val noteID = rows.getString("Note_ID") + val title = rows.getString("Title") + val artist = rows.getString("Artist") + val genre = rows.getString("Genre") + val level = rows.getInt("Level") + val levelText = rows.getString("Level_Text") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Input_Mode AS Mode, COUNT(Input_Mode) AS Value + FROM tw_comment, tw_note + WHERE tw_comment.Note_ID = tw_note.Note_ID + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + inputModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Auto_Mode AS Mode, COUNT(Auto_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + autoModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Note_Salt_Mode AS Mode, COUNT(Note_Salt_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + noteSaltModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Faint_Note_Mode AS Mode, COUNT(Faint_Note_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + faintNoteModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Judgment_Mode AS Mode, COUNT(Judgment_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + judgmentModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Hit_Points_Mode AS Mode, COUNT(Hit_Points_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + hitPointsModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Note_Mobility_Mode AS Mode, COUNT(Note_Mobility_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + noteMobilityModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Long_Note_Mode AS Mode, COUNT(Long_Note_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + longNoteModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Input_Favor_Mode AS Mode, COUNT(Input_Favor_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + inputFavorModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Note_Modify_Mode AS Mode, COUNT(Note_Modify_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + noteModifyModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + }, + logValueFuture { + pool.connection.use { + it.prepareStatement( + """ + SELECT Lowest_Judgment_Condition_Mode AS Mode, COUNT(Lowest_Judgment_Condition_Mode) AS Value + FROM tw_comment + GROUP BY Mode + ORDER BY Value DESC + """.trimIndent() + ).use { dbStatement -> + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + lowestJudgmentConditionModeValues.add(object { + val mode = rows.getInt("Mode") + val value = rows.getInt("Value") + }) + } + } + } + } + } + ).thenApply { + object { + val totalDateSet = totalDateSet + val totalDateValues = totalDateValues + val signUpDateSet = signUpDateSet + val signUpDateValues = signUpDateValues + val avatarDateSet = avatarDateSet + val avatarDateValues = avatarDateValues + val totalNoteFileValues = totalNoteFileValues + val totalTitleValues = totalTitleValues + val totalEdgeValues = totalEdgeValues + val favoriteNoteFileValues = favoriteNoteFileValues + val favoriteNoteFileAtValues = favoriteNoteFileAtValues + val inputModeValues = inputModeValues + val autoModeValues = autoModeValues + val noteSaltModeValues = noteSaltModeValues + val faintNoteModeValues = faintNoteModeValues + val judgmentModeValues = judgmentModeValues + val hitPointsModeValues = hitPointsModeValues + val noteMobilityModeValues = noteMobilityModeValues + val longNoteModeValues = longNoteModeValues + val inputFavorModeValues = inputFavorModeValues + val noteModifyModeValues = noteModifyModeValues + val lowestJudgmentConditionModeValues = lowestJudgmentConditionModeValues + } + } + } + + fun setCommentMax(avatarID: String): CompletableFuture { + return logFuture { + val noteIDs = mutableListOf() + pool.connection.use { + it.prepareStatement( + """ + SELECT DISTINCT Note_ID + FROM tw_comment + WHERE Avatar = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.executeQuery().use { rows -> + while (rows.next()) { + noteIDs.add(rows.getString("Note_ID")) + } + } + } + } + noteIDs.forEach { noteID -> + pool.connection.use { it -> + it.autoCommit = false + var stand = 0 + var date: Timestamp? = null + it.prepareStatement( + """ + SELECT Stand, Date + FROM tw_comment + WHERE Avatar = ? AND Note_ID = ? AND Date = ( + SELECT MAX(Date) + FROM tw_comment AS target_comment + WHERE Avatar = ? AND Note_ID = ? AND Stand = ( + SELECT MAX(Stand) + FROM tw_comment AS target_comment + WHERE Avatar = ? AND Note_ID = ? + ) + ) + """.trimIndent() + ).use { dbStatement -> + dbStatement.setString(1, avatarID) + dbStatement.setString(2, noteID) + dbStatement.setString(3, avatarID) + dbStatement.setString(4, noteID) + dbStatement.setString(5, avatarID) + dbStatement.setString(6, noteID) + dbStatement.executeQuery().use { + if (it.next()) { + stand = it.getInt("Stand") + date = it.getTimestamp("Date") + } + } + } + it.prepareStatement( + """ + UPDATE tw_comment + SET Date = Date, Is_Max = (Stand = ? AND Date = ?) + WHERE Avatar = ? AND Note_ID = ? + """.trimIndent() + ).use { dbStatement -> + dbStatement.setInt(1, stand) + dbStatement.setTimestamp(2, date) + dbStatement.setString(3, avatarID) + dbStatement.setString(4, noteID) + dbStatement.execute() + } + it.commit() + } + } + logInfo("Learned") + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/EdgeSystem.kt b/src/main/kotlin/net/taehui/twilight/system/EdgeSystem.kt new file mode 100644 index 0000000..0307fad --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/EdgeSystem.kt @@ -0,0 +1,91 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import org.apache.commons.io.FilenameUtils +import java.io.IOException +import java.nio.file.Files +import java.util.* +import java.util.concurrent.ConcurrentHashMap + +object EdgeSystem : Logger { + class EdgeItem { + var wwwLevel = "" + var avatarLevel = 0 + var noteIDs: Array? = null + var wwwLevelCount = 0 + } + + private val edgeStore = ConcurrentHashMap() + private val drawingStore = ConcurrentHashMap() + var isLoading = false + + fun getDrawing(edgeID: String): ByteArray? { + return drawingStore[edgeID] + } + + fun loadEdge() { + val jm = ObjectMapper() + isLoading = true + try { + edgeStore.clear() + drawingStore.clear() + Files.list(TwilightComponent.EDGE_ENTRY_PATH).use { edgeEntryPaths -> + edgeEntryPaths.forEach { edgeEntryPath -> + try { + if (Files.isDirectory(edgeEntryPath)) { + Files.list(edgeEntryPath).use { edgeFilePaths -> + edgeFilePaths.forEach { edgeFilePath -> + try { + drawingStore[FilenameUtils.removeExtension(edgeFilePath.fileName.toString())] = + Files.readAllBytes(edgeFilePath) + logInfo("Loaded Edge (${edgeFilePath.fileName})") + } catch (e: IOException) { + logFault(e) + } + } + } + } else if (edgeEntryPath.fileName.toString() == "Default.json") { + val edgeData = TreeMap( + jm.readValue(edgeEntryPath.toFile(), object : TypeReference>() {}) + ) + edgeStore.putAll(edgeData) + logInfo("Loaded Edge (${edgeEntryPath.fileName})") + + jm.writerWithDefaultPrettyPrinter() + .writeValue( + TwilightComponent.EDGE_ENTRY_PATH.resolve("Default.json").toFile(), + edgeData + ) + logInfo("Saved Edge (${edgeEntryPath.fileName})") + } + } catch (e: IOException) { + logFault(e) + } + } + } + } catch (e: IOException) { + logFault(e) + } finally { + isLoading = false + } + } + + fun getEdgeIDs(levelIDs: Collection, noteIDs: Collection, avatarLevel: Int): Collection { + return edgeStore.entries.filter { (_, edgeItem) -> + edgeItem.avatarLevel <= avatarLevel && + (edgeItem.wwwLevel.isEmpty() || levelIDs.any { it == edgeItem.wwwLevel }) && + edgeItem.noteIDs?.all { noteID -> noteIDs.any { it == noteID } } != false && + edgeItem.wwwLevelCount <= levelIDs.size + } + .map { it.key } + } + + fun getEdgeIDs(levelID: String): Collection { + return edgeStore.entries.filter { (_, edgeItem) -> + levelID == edgeItem.wwwLevel + }.map { it.key } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/History.kt b/src/main/kotlin/net/taehui/twilight/system/History.kt new file mode 100644 index 0000000..10f54ae --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/History.kt @@ -0,0 +1,47 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.Avatar +import net.taehui.twilight.Logger +import java.io.IOException +import java.nio.file.Files +import java.nio.file.Paths +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.CopyOnWriteArraySet + +object History : Logger { + private var remoteAvatarIDsMap = ConcurrentHashMap>() + + fun loadHistory() { + try { + remoteAvatarIDsMap.putAll( + ObjectMapper().readValue( + Paths.get("History.json").toFile(), + object : TypeReference>>() {}) + ) + logInfo("Loaded History") + saveHistory() + } catch (e: IOException) { + logFault(e) + } + } + + fun saveHistory() { + Files.newOutputStream(Paths.get("History.json")) + .use { ObjectMapper().writerWithDefaultPrettyPrinter().writeValue(it, remoteAvatarIDsMap) } + logInfo("Saved History") + } + + fun putHistory(avatar: Avatar, avatarID: String) { + if (!avatar.isAwilight) { + remoteAvatarIDsMap.computeIfAbsent(avatar.remote) { + CopyOnWriteArraySet() + }.add(avatarID) + } + } + + fun getAvatarID(avatarIP: String): String { + return (remoteAvatarIDsMap[avatarIP] ?: emptyList()).joinToString() + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/IO.kt b/src/main/kotlin/net/taehui/twilight/system/IO.kt new file mode 100644 index 0000000..242ef89 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/IO.kt @@ -0,0 +1,433 @@ +package net.taehui.twilight.system + +import net.taehui.twilight.BaseCompiler +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import org.apache.commons.codec.binary.Hex +import org.jline.reader.UserInterruptException +import java.nio.file.Files +import java.nio.file.Path +import java.security.MessageDigest +import java.time.LocalDateTime +import java.util.concurrent.CompletableFuture +import java.util.concurrent.atomic.AtomicInteger +import java.util.stream.StreamSupport + + +object IO : Logger { + private val futureNoteLearnerStatus = AtomicInteger() + private var futureNoteLearner: CompletableFuture? = null + private var futureCommentLearner: CompletableFuture? = null + private var futureWipeNote = "" + private var futureWipeNotes: Collection? = null + private var futureWipeComment = "" + private var futureWipeComments: Collection? = null + private var futureWipeBundles: Collection? = null + + fun handleSystem(): String { + var stopText: String? = null + val r = Window.window.r + while (stopText == null) { + try { + val line = r.readLine("> ") + if (line.isNotEmpty()) { + val w = r.parsedLine.words() + if (futureWipeNote.isNotEmpty()) { + if ("y".equals(w[0], ignoreCase = true)) { + DB.wipeNote(futureWipeNote) + } else { + logInfo("Cancelled") + } + futureWipeNote = "" + continue + } + if (futureWipeNotes != null) { + if ("y".equals(w[0], ignoreCase = true)) { + DB.wipeNotes(futureWipeNotes!!) + } else { + logInfo("Cancelled") + } + futureWipeNotes = null + continue + } + if (futureWipeComment.isNotEmpty()) { + if ("y".equals(w[0], ignoreCase = true)) { + DB.wipeComment(futureWipeComment) + } else { + logInfo("Cancelled") + } + futureWipeComment = "" + continue + } + if (futureWipeComments != null) { + if ("y".equals(w[0], ignoreCase = true)) { + DB.wipeComments(futureWipeComments!!) + } else { + logInfo("Cancelled") + } + futureWipeComments = null + continue + } + if (futureWipeBundles != null) { + if ("y".equals(w[0], ignoreCase = true)) { + DB.wipeBundles(futureWipeBundles!!) + } else { + logInfo("Cancelled") + } + futureWipeBundles = null + continue + } + when (w[0]) { + "stop" -> stopText = if (w.size > 1) w[1] else "" + + "alarm" -> { + if (w.size > 2) { + SiteHandler.setSiteNotify( + SiteHandler.getSiteID(w[1]), + w[2] + ) + } else if (w.size > 1) { + AvatarHandler.justNotify(w[1]) + } else { + logInfo("alarm ") + } + } + + "avatar" -> { + if (w.size > 1) { + when (w[1]) { + "view" -> { + AvatarHandler.doInfo(this) + continue + } + + "quit" -> { + if (w.size > 2) { + AvatarHandler.handleNotSignIn(w[2]) + } else { + logInfo("avatar quit ") + } + continue + } + + "ban" -> { + if (w.size > 3) { + AvatarHandler.getAvatar( + w[2] + ).let { + if (it != null) { + BannedIP.putBannedIP( + it.remote, LocalDateTime.parse( + w[3] + ) + ) + it.close() + } else { + logInfo("Failed to Find ID") + } + } + } else { + logInfo("avatar ban ") + } + continue + } + + "allow" -> { + if (w.size > 2) { + BannedIP.wipeBannedIP(w[2]) + } else { + logInfo("avatar allow ") + } + continue + } + } + } + logInfo("avatar [view] view Avatars") + logInfo("avatar [quit] Quit Avatar") + logInfo("avatar [ban] Ban Avatar IP") + logInfo("avatar [allow] Allow Avatar IP") + } + + "awilight" -> { + if (w.size > 2) { + if ("set" == w[1]) { + val awilightCount = w[2].toInt() + Configure.awilightCount = + 0.coerceAtLeast(Configure.awilightCount + awilightCount) + AwilightHandler.setAwilightCount( + awilightCount + ) + continue + } else { + logInfo("awilight set ") + } + } + logInfo("awilight [set] Set Awilight") + } + + "bundle" -> { + if (w.size > 1) { + if ("wipe" == w[1]) { + DB.getWipeBundles().thenAccept { + if (it.isNotEmpty()) { + futureWipeBundles = it + } + logInfo("${it.size} Bundle Files") + } + continue + } + } + logInfo("bundle [wipe] Wipe Bundle Files") + } + + "comment" -> { + if (w.size > 1) { + when (w[1]) { + "wipe" -> { + if (w.size > 2) { + DB.getWipeComment(w[2]).thenAccept { + if (it > 0) { + futureWipeComment = w[2] + } + logInfo("$it Comment Files") + } + } else { + DB.getWipeComments().thenAccept { + if (it.isNotEmpty()) { + futureWipeComments = it + } + logInfo("${it.size} Comment Files") + } + } + continue + } + + "learn" -> { + if (w.size > 2) { + if (futureCommentLearner?.isDone != false) { + futureCommentLearner = DB.setCommentMax(w[2]) + } else { + logInfo( + "Learning Comments" + ) + } + } else { + logInfo("comment learn ") + } + continue + } + } + } + logInfo("comment [wipe] Wipe Comment Files") + logInfo("comment [learn] Learn Comments") + } + + "note" -> { + if (w.size > 1) { + when (w[1]) { + "learn" -> { + fun learnNoteFile(noteFilePath: Path): Boolean { + try { + val noteData = Files.readAllBytes(noteFilePath) + val hashComputer512 = MessageDigest.getInstance("SHA-512") + hashComputer512.update(noteData) + val hashComputer128 = MessageDigest.getInstance("MD5") + hashComputer128.update(noteData) + val hashComputer256 = MessageDigest.getInstance("SHA-256") + hashComputer256.update(noteData) + val noteID512 = Hex.encodeHexString(hashComputer512.digest()) + val noteID128 = Hex.encodeHexString(hashComputer128.digest()) + val noteID256 = Hex.encodeHexString(hashComputer256.digest()) + val targetComputing = BaseCompiler.handleCompile(noteData) + DB.setNote( + "$noteID512:0", + noteID128, + noteID256, + targetComputing + ) + return true + } catch (e: Throwable) { + logFault(e) + return false + } + } + + if (w.size > 2) { + learnNoteFile(Path.of(w[2])) + } else { + if (futureNoteLearner?.isDone != false) { + futureNoteLearner = logFuture { + DB.wipeNotes() + try { + Files.newDirectoryStream( + TwilightComponent.NOTE_ENTRY_PATH + ) + .use { + StreamSupport.stream(it.spliterator(), true) + .forEach { noteFilePath -> + if (learnNoteFile(noteFilePath)) { + futureNoteLearnerStatus.incrementAndGet() + } + } + } + } finally { + logInfo( + "Learned ${futureNoteLearnerStatus.get()} Note Files" + ) + futureNoteLearnerStatus.set(0) + } + } + } else { + logInfo( + "Learning ${futureNoteLearnerStatus.get()} Note Files" + ) + } + } + continue + } + + "ban" -> { + if (w.size > 3) { + BannedNote.putBannedIP(w[2], w[3]) + } else { + logInfo("note ban ") + } + continue + } + + "allow" -> { + if (w.size > 2) { + BannedNote.wipeBannedNote(w[2]) + } else { + logInfo("note allow ") + } + continue + } + + "wipe" -> { + if (w.size > 2) { + DB.getWipeNote(w[2]).thenAccept { + if (it > 0) { + futureWipeNote = w[2] + } + logInfo("$it Notes") + } + } else { + DB.getWipeNotes().thenAccept { + if (it.isNotEmpty()) { + futureWipeNotes = it + } + logInfo("${it.size} Notes") + } + } + continue + } + } + } + logInfo("note [learn] Learn Notes") + logInfo("note [ban] Ban Note") + logInfo("note [allow] Allow Note") + logInfo("note [wipe] Wipe Note File") + } + + "pause" -> { + Configure.mode.pause = !Configure.mode.pause + Configure.saveConfigure() + if (w.size > 1) { + AvatarHandler.pause(w[1]) + } else { + AvatarHandler.pause("") + } + } + + "platform" -> { + if (w.size > 1) { + when (w[1]) { + "avatar" -> { + if (w.size > 3) { + PlatformIDSystem.putPlatformID(w[2], w[3]) + } else if (w.size > 2) { + PlatformIDSystem.wipePlatformID(w[2]) + } else { + logInfo("platform avatar ") + } + continue + } + } + } + logInfo("platform [avatar] ") + } + + "ram" -> { + Runtime.getRuntime().gc() + logInfo( + "Heap: ${ + Runtime.getRuntime().totalMemory() / 1000 / 1000 + } MB / ${Runtime.getRuntime().maxMemory() / 1000 / 1000} MB" + ) + } + + "site" -> { + if (w.size > 1) { + when (w[1]) { + "view" -> { + SiteHandler.doInfo(this) + continue + } + + "put" -> { + if (w.size > 2) { + SiteHandler.putSite(w[2]) + } else { + logInfo("site put ") + } + continue + } + + "wipe" -> { + if (w.size > 2) { + SiteHandler.wipeSite(SiteHandler.getSiteID(w[2])) + } else { + logInfo("site wipe ") + } + continue + } + + "silent" -> { + if (w.size > 2) { + SiteHandler.silentSite(SiteHandler.getSiteID(w[2])) + } else { + logInfo("site silent ") + } + continue + } + } + } + logInfo("site [view] view Sites") + logInfo("site [put] Put Site") + logInfo("site [wipe] Wipe Site") + logInfo("site [silent] Silent Site") + } + + else -> { + logInfo("[alarm] Send Notify") + logInfo("[avatar] Handle Avatars") + logInfo("[awilight] Handle Awilight") + logInfo("[bundle] Handle Bundles") + logInfo("[comment] Handle Comments") + logInfo("[note] Handle Notes") + logInfo("[pause] Pause Twilight") + logInfo("[platform] Handle Platform") + logInfo("[site] Handle Sites") + logInfo("[stop] Stop Twilight") + } + } + } + } catch (_: UserInterruptException) { + } catch (e: Throwable) { + logFault(e) + } + } + return stopText + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/LanguageSystem.kt b/src/main/kotlin/net/taehui/twilight/system/LanguageSystem.kt new file mode 100644 index 0000000..25d1f1d --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/LanguageSystem.kt @@ -0,0 +1,26 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.Logger + +object LanguageSystem : Logger { + private val languageStore = mutableMapOf>() + + init { + LanguageSystem::class.java.classLoader.getResourceAsStream("Language.json")?.use { + languageStore.putAll( + ObjectMapper().readValue( + it, + object : TypeReference>>() {}) + ) + logInfo("Loaded Language") + } + } + + fun getLanguage(language: String, target: String): String { + return languageStore[target]?.get(language) ?: languageStore[target]?.get("en-US") ?: throw RuntimeException( + target + ) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/LevelSystem.kt b/src/main/kotlin/net/taehui/twilight/system/LevelSystem.kt new file mode 100644 index 0000000..c5a2630 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/LevelSystem.kt @@ -0,0 +1,197 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.JSON +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import org.apache.commons.io.FilenameUtils +import java.io.IOException +import java.nio.file.Files +import java.util.* +import java.util.concurrent.ConcurrentHashMap +import java.util.concurrent.CopyOnWriteArrayList +import java.util.stream.Stream + +object LevelSystem : Logger { + class LevelGroup { + var avatarID = "" + var levelItems = emptyArray() + + class LevelItem : Comparable { + override fun compareTo(other: LevelItem): Int { + val levelData = level.compareTo(other.level) + if (levelData != 0) { + return levelData + } + var levelTextData = getValue(levelText).compareTo(getValue(other.levelText)) + if (levelTextData != 0) { + return levelTextData + } + levelTextData = levelText.compareTo(other.levelText) + return if (levelTextData != 0) { + levelTextData + } else title.compareTo(other.title) + } + + var levelID = "" + var noteID = "" + var title = "" + var comment = "" + var levelText = "" + var level = 0 + var stand: IntArray? = null + var point: DoubleArray? = null + var band: IntArray? = null + var judgments: Array? = null + var autoMode: IntArray? = null + var noteSaltMode: IntArray? = null + var audioMultiplier: DoubleArray? = null + var faintNoteMode: IntArray? = null + var judgmentMode: IntArray? = null + var hitPointsMode: IntArray? = null + var noteMobilityMode: IntArray? = null + var longNoteMode: IntArray? = null + var inputFavorMode: IntArray? = null + var noteModifyMode: IntArray? = intArrayOf(0) + var bpmMode: IntArray? = intArrayOf(0) + var waveMode: IntArray? = intArrayOf(0) + var setNoteMode: IntArray? = intArrayOf(0) + var lowestJudgmentConditionMode: IntArray? = null + var allowPause = true + + fun isSatisfy(qwilightWwwLevel: JSON.QwilightWwwLevel): Boolean { + return judgments?.let { + it.indices.all { i -> + isSatisfy(it[i], qwilightWwwLevel.judgments[i]) + } + } != false && + isSatisfy(stand, qwilightWwwLevel.stand) && + isSatisfy(point, qwilightWwwLevel.point) && + isSatisfy(band, qwilightWwwLevel.highestBand) && + isSatisfyMode(autoMode, qwilightWwwLevel.autoMode) && + isSatisfyMode(noteSaltMode, qwilightWwwLevel.noteSaltMode) && + isSatisfyMode(faintNoteMode, qwilightWwwLevel.faintNoteMode) && + isSatisfyMode(judgmentMode, qwilightWwwLevel.judgmentMode) && + isSatisfyMode(hitPointsMode, qwilightWwwLevel.hitPointsMode) && + isSatisfyMode(noteMobilityMode, qwilightWwwLevel.noteMobilityMode) && + isSatisfyMode(longNoteMode, qwilightWwwLevel.longNoteMode) && + isSatisfyMode(inputFavorMode, qwilightWwwLevel.inputFavorMode) && + isSatisfyMode(noteModifyMode, qwilightWwwLevel.noteModifyMode) && + isSatisfyMode(bpmMode, qwilightWwwLevel.bpmMode) && + isSatisfyMode(waveMode, qwilightWwwLevel.waveMode) && + isSatisfyMode(setNoteMode, qwilightWwwLevel.setNoteMode) && + isSatisfyMode(lowestJudgmentConditionMode, qwilightWwwLevel.lowestJudgmentConditionMode) + } + + companion object { + fun getValue(data: String): Int { + return try { + data.replace("\\D".toRegex(), "").toInt() + } catch (e: NumberFormatException) { + 0 + } + } + + fun isSatisfy(data: IntArray?, target: Int): Boolean { + return if (data != null) { + val lowestData = data[0] + val highestData = data[1] + (lowestData == -1 || lowestData <= target) && (highestData == -1 || target <= highestData) + } else { + true + } + } + + fun isSatisfy(data: DoubleArray?, target: Double): Boolean { + return if (data != null) { + val lowestData = data[0] + val highestData = data[1] + (lowestData == -1.0 || lowestData <= target) && (highestData == -1.0 || target <= highestData) + } else { + true + } + } + + fun isSatisfyMode(data: IntArray?, target: Int): Boolean { + return data?.any { + it == target + } ?: true + } + } + } + } + + private val levelGroupsMap = ConcurrentHashMap>() + private val levelGroupMap = ConcurrentHashMap() + private val levelNamesMap = ConcurrentHashMap>() + val levelNoteIDs = CopyOnWriteArrayList() + var isLoading = false + + fun loadLevel() { + val jm = ObjectMapper() + isLoading = true + try { + levelGroupsMap.clear() + levelGroupMap.clear() + levelNamesMap.clear() + levelNoteIDs.clear() + Files.list(TwilightComponent.LEVEL_ENTRY_PATH).use { + it.forEach { levelFilePath -> + try { + val levelGroup = jm.readValue(levelFilePath.toFile(), LevelGroup::class.java) + levelGroup.levelItems.map { data -> + data.noteID.split("/".toRegex()).toTypedArray() + }.forEach { noteIDs -> levelNoteIDs.addAll(listOf(*noteIDs)) } + Arrays.sort(levelGroup.levelItems) + + val avatarID = levelGroup.avatarID + val levelName = FilenameUtils.removeExtension(levelFilePath.fileName.toString()) + levelGroupsMap.computeIfAbsent(avatarID) { mutableListOf() }.add(levelGroup) + levelGroupMap[levelName] = levelGroup + levelNamesMap.computeIfAbsent(avatarID) { mutableListOf() }.add(levelName) + logInfo("Loaded Level (${levelFilePath.fileName})") + + jm.writerWithDefaultPrettyPrinter().writeValue(levelFilePath.toFile(), levelGroup) + logInfo("Saved Level (${levelFilePath.fileName})") + } catch (e: IOException) { + logFault(e) + } + } + } + } catch (e: IOException) { + logFault(e) + } finally { + isLoading = false + } + } + + val avatars: Array + get() = levelGroupsMap.keys.filter { it.isNotEmpty() }.map { + object { + val avatarID = it + val avatarName = DB.getAvatarName(it) + } + }.sortedBy { it.avatarName }.toTypedArray() + + fun getLevelNames(avatarID: String): Array { + return levelNamesMap[avatarID]?.sorted()?.toTypedArray() ?: emptyArray() + } + + fun getLevelGroup(levelName: String): LevelGroup? { + return levelGroupMap[levelName] + } + + fun getSatisfiedLevelItems(qwilightWwwLevel: JSON.QwilightWwwLevel): Stream { + return levelGroupMap.values.stream().flatMap { Arrays.stream(it.levelItems) } + .filter { + it.noteID == qwilightWwwLevel.noteID && it.isSatisfy( + qwilightWwwLevel + ) + } + } + + fun getLevelItem(levelID: String): LevelGroup.LevelItem? { + return levelGroupMap.values.stream().flatMap { Arrays.stream(it.levelItems) } + .filter { it.levelID == levelID }.toList().randomOrNull() + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/NoteFilesSystem.kt b/src/main/kotlin/net/taehui/twilight/system/NoteFilesSystem.kt new file mode 100644 index 0000000..99a0986 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/NoteFilesSystem.kt @@ -0,0 +1,38 @@ +package net.taehui.twilight.system + +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import net.taehui.twilight.Utility +import java.io.IOException +import java.nio.file.Files +import java.nio.file.Path +import java.util.concurrent.ConcurrentHashMap + +object NoteFilesSystem : Logger { + private val noteFiles = ConcurrentHashMap() + + fun loadNoteFiles() { + try { + noteFiles.clear() + Files.list(TwilightComponent.NOTE_ENTRY_PATH).use { noteFilePaths -> + noteFilePaths.forEach { noteFilePath -> + noteFiles["${noteFilePath.fileName}:0"] = noteFilePath + } + } + logInfo("Loaded Note Files") + } catch (e: IOException) { + logFault(e) + } + } + + val noteFile: Map.Entry? + get() = Utility.getSaltedItem(ArrayList?>(noteFiles.entries), null) + + fun getNoteFile(noteID: String): Path? { + return noteFiles[noteID] + } + + fun hasNoteFile(noteID: String): Boolean { + return noteFiles.containsKey(noteID) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/PlatformIDSystem.kt b/src/main/kotlin/net/taehui/twilight/system/PlatformIDSystem.kt new file mode 100644 index 0000000..c19ffd3 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/PlatformIDSystem.kt @@ -0,0 +1,41 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.Logger +import java.io.IOException +import java.nio.file.Paths +import java.util.concurrent.ConcurrentHashMap + +object PlatformIDSystem : Logger { + private var platformIDStore = ConcurrentHashMap() + + fun savePlatformID() { + ObjectMapper().writerWithDefaultPrettyPrinter().writeValue(Paths.get("Platform ID.json").toFile(), platformIDStore) + logInfo("Saved Platform ID") + } + + fun loadPlatformID() { + try { + platformIDStore.putAll( + ObjectMapper().readValue(Paths.get("Platform ID.json").toFile(), + object : TypeReference>() {}) + ) + logInfo("Loaded Platform ID") + } catch (e: IOException) { + logFault(e) + } + } + + fun putPlatformID(platformID: String, avatarID: String) { + platformIDStore[if (platformID.startsWith("$")) platformID else "$${platformID}"] = avatarID + } + + fun wipePlatformID(platformID: String) { + platformIDStore.remove(if (platformID.startsWith("$")) platformID else "$${platformID}") + } + + fun getAvatarID(platformID: String): String { + return platformIDStore.getOrDefault(platformID, platformID) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/PlatformSystem.kt b/src/main/kotlin/net/taehui/twilight/system/PlatformSystem.kt new file mode 100644 index 0000000..cd3ef6f --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/PlatformSystem.kt @@ -0,0 +1,221 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.databind.ObjectMapper +import net.dv8tion.jda.api.JDA +import net.dv8tion.jda.api.JDABuilder +import net.dv8tion.jda.api.entities.Guild +import net.dv8tion.jda.api.entities.Member +import net.dv8tion.jda.api.entities.channel.concrete.TextChannel +import net.dv8tion.jda.api.events.guild.member.GuildMemberJoinEvent +import net.dv8tion.jda.api.events.guild.member.GuildMemberRemoveEvent +import net.dv8tion.jda.api.events.guild.member.GuildMemberUpdateEvent +import net.dv8tion.jda.api.events.guild.member.update.GuildMemberUpdateAvatarEvent +import net.dv8tion.jda.api.events.message.MessageDeleteEvent +import net.dv8tion.jda.api.events.message.MessageReceivedEvent +import net.dv8tion.jda.api.events.message.MessageUpdateEvent +import net.dv8tion.jda.api.hooks.ListenerAdapter +import net.dv8tion.jda.api.requests.GatewayIntent +import net.taehui.twilight.HCDataHandler +import net.taehui.twilight.JSON +import net.taehui.twilight.Logger +import net.taehui.twilight.Twilight +import org.apache.hc.client5.http.classic.methods.HttpGet +import org.apache.hc.client5.http.impl.classic.HttpClients +import java.text.NumberFormat +import java.util.concurrent.CompletableFuture +import java.util.concurrent.ConcurrentHashMap + +object PlatformSystem : Logger { + class Client { + var platform = "" + var qwilight = 0L + var siteNotify = 0L + var siteDefault = 0L + var sitePlatform = 0L + var siteYellDefault = "" + var siteYellEnter = "" + var siteYellQuit = "" + var siteYellTaehui = "" + var siteYellComment = "" + var siteYellInvite = "" + var siteYellTV = "" + } + + private val drawingStore = ConcurrentHashMap() + private lateinit var platformClient: Client + private var platform: JDA? = null + private var qwilightPlatform: Guild? = null + var platformAvatars = emptyList() + + fun handleSystem() { + if (Configure.mode.platform) { + try { + fun doCallPlatformAvatars() { + qwilightPlatform?.loadMembers()?.onSuccess { avatars -> + platformAvatars = avatars.filter { !it.user.isBot && !it.user.isSystem } + CompletableFuture.allOf( + *platformAvatars.map { putDrawing("$${it.id}", it.effectiveAvatarUrl) }.toTypedArray() + ) + }?.onSuccess { + SiteHandler.doCallSiteAvatar( + SiteHandler.platformSiteID, + platformAvatars + ) + } + } + + platformClient = ObjectMapper().readValue( + Twilight::class.java.classLoader.getResourceAsStream("Client.json"), + Client::class.java + ) + platform = JDABuilder.createDefault(platformClient.platform) + .enableIntents(GatewayIntent.MESSAGE_CONTENT, GatewayIntent.GUILD_MEMBERS) + .addEventListeners(object : ListenerAdapter() { + override fun onMessageReceived(event: MessageReceivedEvent) { + event.member?.let { + if (!event.author.isBot && !event.author.isSystem) { + if (event.channel.idLong == platformClient.siteDefault) { + event.message.delete().queue() + SiteHandler.putSiteYell(SiteHandler.defaultSiteID, it, event) + } else if (event.channel.idLong == platformClient.sitePlatform) { + SiteHandler.putSiteYell(SiteHandler.platformSiteID, it, event) + } + } + } + } + + override fun onMessageUpdate(event: MessageUpdateEvent) { + if (event.channel.idLong == platformClient.sitePlatform) { + event.member?.let { + SiteHandler.doModifySIteYell(SiteHandler.platformSiteID, it, event) + } + } + } + + override fun onMessageDelete(event: MessageDeleteEvent) { + if (event.channel.idLong == platformClient.sitePlatform) { + SiteHandler.wipeSiteYell(SiteHandler.platformSiteID, event) + } + } + + override fun onGuildMemberJoin(event: GuildMemberJoinEvent) { + doCallPlatformAvatars() + } + + override fun onGuildMemberRemove(event: GuildMemberRemoveEvent) { + doCallPlatformAvatars() + } + + override fun onGuildMemberUpdateAvatar(event: GuildMemberUpdateAvatarEvent) { + doCallPlatformAvatars() + } + + override fun onGuildMemberUpdate(event: GuildMemberUpdateEvent) { + doCallPlatformAvatars() + } + }).build().awaitReady() + qwilightPlatform = platform?.getGuildById(platformClient.qwilight) + doCallPlatformAvatars() + } catch (e: Throwable) { + logFault(e) + } + } + } + + fun dispose() { + platform?.shutdown() + } + + fun sendSiteYell(siteYellData: JSON.TwilightSiteYell) { + var site: TextChannel? = null + when (siteYellData.siteID) { + "00000000-0000-0000-0000-000000000000" -> site = qwilightPlatform?.getTextChannelById( + platformClient.siteNotify + ) + + "00000000-0000-0000-0000-000000000001" -> site = + qwilightPlatform?.getTextChannelById(platformClient.siteDefault) + } + try { + when (siteYellData.avatarName) { + "@Enter" -> site?.sendMessage(String.format(platformClient.siteYellEnter, siteYellData.siteYell)) + + "@Quit" -> site?.sendMessage(String.format(platformClient.siteYellQuit, siteYellData.siteYell)) + + "@Notify" -> site?.sendMessage( + String.format( + platformClient.siteYellTaehui, + siteYellData.siteYell + ) + ) + + "@Comment" -> { + val twilightCommentSiteYell = + ObjectMapper().readValue(siteYellData.siteYell, JSON.TwilightCommentSiteYell::class.java) + site?.sendMessage( + String.format( + platformClient.siteYellComment, + twilightCommentSiteYell.avatarName, + twilightCommentSiteYell.levelText, + twilightCommentSiteYell.artist, + twilightCommentSiteYell.title, + if (twilightCommentSiteYell.genre.isEmpty()) "" else "#${twilightCommentSiteYell.genre}", + NumberFormat.getInstance().format(twilightCommentSiteYell.stand.toLong()) + ) + ) + } + + "@Invite" -> { + val twilightInviteSiteYell = + ObjectMapper().readValue(siteYellData.siteYell, JSON.TwilightInviteSiteYell::class.java) + site?.sendMessage( + String.format( + platformClient.siteYellInvite, + twilightInviteSiteYell.avatarName, + twilightInviteSiteYell.siteName + ) + ) + } + + "@TV" -> { + val twilightTVSiteYell = + ObjectMapper().readValue(siteYellData.siteYell, JSON.TwilightTVSiteYell::class.java) + site?.sendMessage( + String.format( + platformClient.siteYellTV, + twilightTVSiteYell.text, + twilightTVSiteYell.title + ) + ) + } + + else -> { + site?.sendMessage( + String.format( + platformClient.siteYellDefault, + siteYellData.avatarName, + siteYellData.siteYell + ) + ) + } + }?.queue() + } catch (e: Throwable) { + logFault(e) + } + } + + fun putDrawing(avatarID: String, platformDrawing: String): CompletableFuture { + return if (drawingStore.containsKey(avatarID)) { + CompletableFuture.completedFuture(null) + } else { + logFuture { + HttpClients.createDefault() + .use { drawingStore[avatarID] = it.execute(HttpGet(platformDrawing), HCDataHandler()) } + } + } + } + + fun getDrawing(avatarID: String): ByteArray? { + return drawingStore[avatarID] + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/QwilightNamesSystem.kt b/src/main/kotlin/net/taehui/twilight/system/QwilightNamesSystem.kt new file mode 100644 index 0000000..f232e40 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/QwilightNamesSystem.kt @@ -0,0 +1,31 @@ +package net.taehui.twilight.system + +import net.taehui.twilight.Logger +import net.taehui.twilight.Utility + +object QwilightNamesSystem : Logger { + private val qwilightNameCountMap = mutableMapOf() + private val qwilightNames = mutableListOf() + + fun loadQwilightNames() { + qwilightNames.addAll(DB.getQwilightNames()) + qwilightNames.forEach { qwilightNameCountMap[it] = 0 } + logInfo("Loaded Qwilight Names") + } + + val qwilightName: String + get() { + synchronized(qwilightNameCountMap) { + val minValue = qwilightNameCountMap.values.minOrNull() ?: 0 + val qwilightName = Utility.getSaltedItem( + qwilightNameCountMap.entries + .filter { it.value == minValue } + .map { it.key }, "" + ) + if (qwilightName.isNotEmpty()) { + qwilightNameCountMap[qwilightName] = (qwilightNameCountMap[qwilightName] ?: 0) + 1 + } + return qwilightName + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/SiteHandler.kt b/src/main/kotlin/net/taehui/twilight/system/SiteHandler.kt new file mode 100644 index 0000000..07469b6 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/SiteHandler.kt @@ -0,0 +1,389 @@ +package net.taehui.twilight.system + +import com.google.protobuf.ByteString +import net.dv8tion.jda.api.entities.Member +import net.dv8tion.jda.api.events.message.MessageDeleteEvent +import net.dv8tion.jda.api.events.message.MessageReceivedEvent +import net.dv8tion.jda.api.events.message.MessageUpdateEvent +import net.taehui.CommentClass +import net.taehui.EventClass +import net.taehui.twilight.Avatar +import net.taehui.twilight.JSON +import net.taehui.twilight.Logger +import net.taehui.twilight.Site +import java.util.* +import java.util.concurrent.ConcurrentHashMap + +object SiteHandler { + private val sites = ConcurrentHashMap() + + val commentSiteID: UUID = UUID.fromString("00000000-0000-0000-0000-000000000000") + val defaultSiteID: UUID = UUID.fromString("00000000-0000-0000-0000-000000000001") + val platformSiteID: UUID = UUID.fromString("00000000-0000-0000-0000-000000000002") + + init { + val defaultSite = Site( + defaultSiteID, "@Default", + isEditable = true, + isGetNotify = true, + isEssential = true, + hasAvatar = true + ) + defaultSite.setSiteYells(DB.getSiteYells(defaultSiteID.toString())) + sites[defaultSiteID] = defaultSite + val commentSite = Site( + commentSiteID, "@Comment", + isEditable = false, + isGetNotify = false, + isEssential = true, + hasAvatar = true + ) + commentSite.setSiteYells(DB.getSiteYells(commentSiteID.toString())) + sites[commentSiteID] = commentSite + if (Configure.mode.platform) { + val platformSite = Site( + platformSiteID, "@Platform", + isEditable = false, + isGetNotify = false, + isEssential = true, + hasAvatar = false + ) + platformSite.setSiteYells(DB.getSiteYells(platformSiteID.toString())) + sites[platformSiteID] = platformSite + } + } + + fun send(siteID: UUID, event: EventClass.Event) { + sites[siteID]?.send(event) + } + + fun silentSite(siteID: UUID) { + DB.silentSite(siteID.toString()).thenAccept { + sites[siteID]?.silentSite() + } + } + + fun wipeSite(siteID: UUID) { + sites[siteID]?.let { + if (it.quitAvatars()) { + sites.remove(siteID) + } else { + silentSite(siteID) + } + } + } + + fun doInfo(logger: Logger) { + sites.values.forEach { logger.logInfo(it.toString()) } + } + + fun putSite(siteName: String) { + val siteID = UUID.randomUUID() + val site = Site( + siteID, siteName, + isEditable = true, + isGetNotify = true, + isEssential = false, + hasAvatar = true + ) + sites[siteID] = site + } + + fun hasAvatar(avatar: Avatar, siteID: UUID): Boolean { + return sites[siteID]?.isAvatarJoined(avatar) == true + } + + fun isNetSiteHand(avatar: Avatar, siteID: UUID): Boolean { + return sites[siteID]?.isNetSiteHand(avatar) == true + } + + fun getCalledSites(): Collection { + return sites.values.mapNotNull { it.getCallingData() } + } + + fun setLevying(avatar: Avatar, siteID: UUID) { + sites[siteID]?.setLevying(avatar) + } + + fun stopSiteNet(avatar: Avatar, siteID: UUID) { + sites[siteID]?.stopSiteNet(avatar) + } + + fun setCompiled(avatar: Avatar, toQwilightCompiled: JSON.QwilightCompiled) { + sites[UUID.fromString(toQwilightCompiled.siteID)]?.setCompiled( + avatar, + toQwilightCompiled.isCompiled, + toQwilightCompiled.handlerID + ) + } + + fun setModeComponent(avatar: Avatar, qwilightSetModeComponent: JSON.QwilightSetModeComponent) { + sites[UUID.fromString(qwilightSetModeComponent.siteID)]?.setModeComponent( + avatar, qwilightSetModeComponent.data + ) + } + + fun setFavorNoteFile(avatar: Avatar, siteID: UUID) { + sites[siteID]?.setFavorNoteFile( + avatar + ) + } + + fun setFavorModeComponent(avatar: Avatar, siteID: UUID) { + sites[siteID]?.setFavorModeComponent( + avatar + ) + } + + fun setFavorAudioMultiplier(avatar: Avatar, siteID: UUID) { + sites[siteID]?.setFavorAudioMultiplier( + avatar + ) + } + + fun setAvatarGroup(avatar: Avatar, siteID: UUID, qwilightSetAvatarGroup: JSON.QwilightSetAvatarGroup) { + sites[siteID]?.setAvatarGroup( + avatar, qwilightSetAvatarGroup + ) + } + + fun setAutoSiteHand(avatar: Avatar, siteID: UUID) { + sites[siteID]?.setAutoSiteHand( + avatar + ) + } + + fun setValidHunterMode(avatar: Avatar, siteID: UUID) { + sites[siteID]?.setValidHunterMode( + avatar + ) + } + + fun setValidNetMode(avatar: Avatar, siteID: UUID, qwilightSetValidNetMode: JSON.QwilightSetValidNetMode) { + sites[siteID]?.setValidNetMode( + avatar, qwilightSetValidNetMode + ) + } + + fun setAllowedPostableItems(avatar: Avatar, siteID: UUID, qwilightSetAllowedPostableItems: JSON.QwilightSetAllowedPostableItems) { + sites[siteID]?.setAllowedPostableItems( + avatar, qwilightSetAllowedPostableItems + ) + } + + fun doCallNetSiteComments(avatar: Avatar, siteID: UUID) { + sites[siteID]?.doCallNetSiteComments( + avatar + ) + } + + fun doCallSiteAvatar(siteID: UUID, avatars: List) { + sites[siteID]?.doCallSiteAvatar(null, avatars) + } + + fun setSiteHand(avatar: Avatar, siteID: UUID, siteHandAvatar: Avatar) { + sites[siteID]?.setSiteHand( + avatar, siteHandAvatar + ) + } + + fun setSiteName(avatar: Avatar, siteID: UUID, siteName: String) { + sites[siteID]?.setSiteName( + avatar, siteName + ) + } + + fun setNoteFileContents(avatar: Avatar, siteID: UUID, noteFileContents: JSON.QwilightSetNoteFile) { + sites[siteID]?.setNoteFileContents( + avatar, noteFileContents + ) + } + + fun setNetData(avatar: Avatar, qwilightCallNet: EventClass.Event.QwilightCallNet, comment: CommentClass.Comment?) { + sites[UUID.fromString(qwilightCallNet.siteID)]?.setNetData( + avatar, qwilightCallNet, comment + ) + } + + fun exileAvatar(siteID: UUID, avatar: Avatar, asAvatar: Avatar) { + sites[siteID]?.let { + if (it.exileAvatar( + avatar, asAvatar + ) && it.isVoid + ) { + sites.remove(siteID) + it.onWipeSite() + } + } + } + + fun putSilentSite(avatar: Avatar, avatarSilent: Avatar) { + val siteID = UUID.randomUUID() + val site = Site( + siteID, + false, + "${avatar.avatarName}, ${avatarSilent.avatarName}", + "", + avatar, + false + ) + site.putSiteYell("@Site", avatar.avatarID, avatar.avatarName, System.currentTimeMillis()) + sites[siteID] = site + site.enterSite(avatar) + site.enterSite(avatarSilent) + } + + fun putSite(avatar: Avatar, siteID: UUID, qwilightNewSite: JSON.QwilightNewSite) { + val site = Site(siteID, false, qwilightNewSite.siteName, qwilightNewSite.siteCipher, avatar, true) + site.putSiteYell("@Site", avatar.avatarID, avatar.avatarName, System.currentTimeMillis()) + sites[siteID] = site + site.enterSite(avatar) + } + + fun putNetSite(avatar: Avatar, siteID: UUID, qwilightNewSite: JSON.QwilightNewSite) { + val millis = System.currentTimeMillis() + val site = Site(siteID, true, qwilightNewSite.siteName, qwilightNewSite.siteCipher, avatar, true) + site.putSiteYell("@Net", avatar.avatarID, avatar.avatarName, millis) + if (qwilightNewSite.siteCipher.isEmpty() && !avatar.isAwilight && hasAvatar( + avatar, + defaultSiteID + ) + ) { + putSiteYell( + siteID, + qwilightNewSite.siteName, + avatar, + millis + ) + } + sites[siteID] = site + site.setModeComponent(qwilightNewSite.data!!) + site.setNoteFileContents(JSON.QwilightSetNoteFile().apply { + noteID = qwilightNewSite.noteID + noteIDs = qwilightNewSite.noteIDs!! + title = qwilightNewSite.title + artist = qwilightNewSite.artist + genre = qwilightNewSite.genre + levelText = qwilightNewSite.levelText + level = qwilightNewSite.level + wantLevelID = qwilightNewSite.wantLevelID + judgmentStage = qwilightNewSite.judgmentStage + hitPointsValue = qwilightNewSite.hitPointsValue + totalNotes = qwilightNewSite.totalNotes + longNotes = qwilightNewSite.longNotes + autoableNotes = qwilightNewSite.autoableNotes + trapNotes = qwilightNewSite.trapNotes + highestInputCount = qwilightNewSite.highestInputCount + length = qwilightNewSite.length + bpm = qwilightNewSite.bpm + lowestBPM = qwilightNewSite.lowestBPM + highestBPM = qwilightNewSite.highestBPM + isAutoLongNote = qwilightNewSite.isAutoLongNote + inputMode = qwilightNewSite.inputMode + bundleEntryPath = qwilightNewSite.bundleEntryPath + }) + site.setAllowedPostableItems(qwilightNewSite.allowedPostableItems) + site.enterSite(avatar) + } + + fun quitAvatar(avatar: Avatar) { + sites.forEach { + it.value.quitAvatar(avatar) + if (it.value.isVoid) { + sites.remove(it.key) + it.value.onWipeSite() + } + } + } + + fun quitAvatar(avatar: Avatar, siteID: UUID) { + sites[siteID]?.let { + it.quitAvatar(avatar) + if (it.isVoid) { + sites.remove(siteID) + it.onWipeSite() + } + } + } + + fun enterSite(siteID: UUID, avatar: Avatar, siteCipher: String) { + sites[siteID]?.enterSite( + avatar, siteCipher + ) ?: avatar.send(EventClass.Event.EventID.WARNING, avatar.translateLanguage("siteNotAvailable")) + } + + fun setNetBundle(siteID: UUID, bundleName: String) { + sites[siteID]?.setNetBundle(bundleName) + } + + private fun putSiteYell(siteID: UUID, siteName: String, avatar: Avatar, millis: Long) { + sites[defaultSiteID]?.putSiteYell( + siteID, siteName, avatar.avatarID, avatar.avatarName, millis + ) + } + + fun putSiteYell(tvItem: TVSystem.TVItem) { + sites[defaultSiteID]?.putSiteYell(tvItem) + } + + fun putSiteYell(avatar: Avatar, qwilightSiteYell: JSON.QwilightSiteYell) { + if (qwilightSiteYell.siteYell.length <= 160 && qwilightSiteYell.siteYell.isNotBlank()) { + sites[UUID.fromString(qwilightSiteYell.siteID)]?.putSiteYell(avatar, qwilightSiteYell) + } + } + + fun putSiteYell(siteID: UUID, avatar: Member, platformEvent: MessageReceivedEvent) { + sites[siteID]?.putSiteYell( + avatar, platformEvent + ) + } + + fun putSiteYell(siteID: UUID, twilightCommentSiteYell: JSON.TwilightCommentSiteYell) { + sites[siteID]?.putSIteYell( + twilightCommentSiteYell + ) + } + + fun doModifySIteYell(siteID: UUID, avatar: Member, platformEvent: MessageUpdateEvent) { + sites[siteID]?.doModifySiteYell( + avatar, platformEvent + ) + } + + fun wipeSiteYell(siteID: UUID, platformEvent: MessageDeleteEvent) { + sites[siteID]?.wipeSiteYell(platformEvent) + } + + fun getSiteYells(siteID: UUID, avatar: Avatar, qwilightGetSiteYells: JSON.QwilightGetSiteYells) { + sites[siteID]?.getSiteYells( + avatar, qwilightGetSiteYells + ) + } + + fun setSiteNotify(siteID: UUID, input: String) { + sites[siteID]?.setSiteNotify( + input + ) + } + + fun audioInput(siteID: UUID, avatar: Avatar, data: ByteString) { + sites[siteID]?.audioInput( + avatar, data + ) + } + + fun postItem(siteID: UUID, avatar: Avatar, qwilightPostItem: EventClass.Event.QwilightPostItem) { + sites[siteID]?.postItem( + avatar, qwilightPostItem + ) + } + + fun getSiteID(siteID: String): UUID { + return when (siteID) { + "@Comment" -> commentSiteID + "@Default" -> defaultSiteID + "@Platform" -> platformSiteID + else -> UUID.fromString(siteID) + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/TVSystem.kt b/src/main/kotlin/net/taehui/twilight/system/TVSystem.kt new file mode 100644 index 0000000..74d8a2d --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/TVSystem.kt @@ -0,0 +1,93 @@ +package net.taehui.twilight.system + +import net.taehui.twilight.Logger +import org.openqa.selenium.By +import org.openqa.selenium.TimeoutException +import org.openqa.selenium.WebDriver +import org.openqa.selenium.edge.EdgeDriver +import org.openqa.selenium.edge.EdgeOptions +import org.openqa.selenium.support.ui.ExpectedConditions +import org.openqa.selenium.support.ui.WebDriverWait +import java.time.Duration +import java.util.concurrent.Executors +import java.util.concurrent.ScheduledExecutorService +import java.util.concurrent.TimeUnit + +object TVSystem : Logger { + class TVItem(val href: String, val title: String, val text: String) { + override fun hashCode(): Int { + return href.hashCode() + } + + override fun equals(other: Any?): Boolean { + return href == (other as TVItem).href + } + + override fun toString(): String { + return text + } + } + + private val ses: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor { + Executors.defaultThreadFactory().newThread(it).apply { + isDaemon = true + } + } + private var targetSystem: WebDriver? = null + + fun handleSystem() { + if (Configure.mode.tv) { + try { + targetSystem = EdgeDriver(EdgeOptions().apply { + addArguments("--headless", "--no-sandbox") + }) + + val pendingElements = mutableMapOf() + var lastElements = emptySet() + ses.scheduleWithFixedDelay({ + targetSystem?.get("https://www.twitch.tv/directory/game/Qwilight") + val dataTest = By.cssSelector("[data-test-selector=TitleAndChannel]") + val elements = try { + WebDriverWait( + targetSystem, + Duration.ofSeconds(1) + ).until(ExpectedConditions.visibilityOfAllElementsLocatedBy(dataTest)) + targetSystem?.findElements(dataTest) ?: throw TimeoutException() + } catch (e: TimeoutException) { + emptyList() + }.map { + TVItem( + it.getAttribute("href"), + it.findElement(By.tagName("h3")).text, + it.findElement(By.tagName("p")).text + ) + }.toSet() + elements.subtract(lastElements).filter { + pendingElements.remove(it) == null + }.forEach { + SiteHandler.putSiteYell(it) + } + lastElements.subtract(elements).forEach { + pendingElements[it] = 0 + } + pendingElements.toMap().forEach { + if (it.value < 5) { + pendingElements[it.key] = it.value + 1 + } else { + pendingElements.remove(it.key) + } + } + lastElements = elements + }, 0L, 1L, TimeUnit.MINUTES) + } catch (e: Throwable) { + logFault(e) + } + } + } + + fun dispose() { + ses.shutdown() + ses.awaitTermination(1, TimeUnit.SECONDS) + targetSystem?.quit() + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/TitleSystem.kt b/src/main/kotlin/net/taehui/twilight/system/TitleSystem.kt new file mode 100644 index 0000000..9d6569a --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/TitleSystem.kt @@ -0,0 +1,154 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.core.type.TypeReference +import com.fasterxml.jackson.databind.DeserializationFeature +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.JSON +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import java.io.IOException +import java.nio.file.Files +import java.util.* +import java.util.concurrent.ConcurrentHashMap +import java.util.stream.Collectors + +object TitleSystem : Logger { + class TitleItem : Comparable { + var title = "" + var title1042 = "" + var titleColor = "" + var wwwLevel = "" + var avatarLevel = 0 + var noteIDs: Array? = null + var titleLevel = 0 + + override fun compareTo(other: TitleItem): Int { + val avatarLevelData = avatarLevel.compareTo(other.avatarLevel) + if (avatarLevelData != 0) { + return avatarLevelData + } + val levelItem0 = LevelSystem.getLevelItem(wwwLevel) + val levelItem1 = LevelSystem.getLevelItem(other.wwwLevel) + if (levelItem0 != null && levelItem1 != null) { + val levelData = levelItem0.compareTo(levelItem1) + if (levelData != 0) { + return levelData + } + } + val titleData = title.compareTo(other.title) + return if (titleData != 0) { + titleData + } else { + titleLevel.compareTo(other.titleLevel) + } + } + } + + private val titleStore = ConcurrentHashMap() + var isLoading = false + + fun loadTitle() { + isLoading = true + val jm = ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + try { + titleStore.clear() + Files.list(TwilightComponent.TITLE_ENTRY_PATH).use { titleFilePaths -> + titleFilePaths.forEach { titleFilePath -> + try { + val titleItems = + jm.readValue(titleFilePath.toFile(), object : TypeReference>() {}) + val titleData = TreeMap(Comparator.comparing { titleItems[it]!! }) + titleData.putAll(titleItems) + titleStore.putAll(titleData) + logInfo("Loaded Title (${titleFilePath.fileName})") + + jm.writerWithDefaultPrettyPrinter().writeValue(titleFilePath.toFile(), titleData) + logInfo("Saved Title (${titleFilePath.fileName})") + } catch (e: IOException) { + logFault(e) + } + } + } + } catch (e: IOException) { + logFault(e) + } finally { + isLoading = false + } + } + + fun getTitle(language: String, titleID: String): JSON.TwilightWwwTitle? { + val titleItem = titleStore[titleID] + return if (titleItem != null) JSON.TwilightWwwTitle( + when (language) { + "ko-KR" -> titleItem.title1042 + else -> titleItem.title + }, titleItem.titleColor + ) else null + } + + fun getTitles( + levelIDs: Collection, noteIDs: Collection, avatarLevel: Int, language: String + ): Collection { + return getTitleIDs(levelIDs, noteIDs, avatarLevel).stream().sorted { o1, o2 -> + val titleItem1 = titleStore[o1]!! + val titleItem2 = titleStore[o2]!! + val titleColorData = titleItem1.titleColor.compareTo(titleItem2.titleColor) + if (titleColorData != 0) titleColorData else titleItem1.compareTo(titleItem2) + }.map { + val titleItem = titleStore[it]!! + + object { + val titleID = it + val title = when (language) { + "ko-KR" -> titleItem.title1042 + else -> titleItem.title + } + val titleColor = titleItem.titleColor + } + }.toList() + } + + fun getTitleItems( + levelIDs: Collection, noteIDs: Collection, avatarLevel: Int + ): Collection { + return getTitleIDs(levelIDs, noteIDs, avatarLevel).mapNotNull { titleStore[it] } + } + + fun getTitleIDs(levelIDs: Collection, noteIDs: Collection, avatarLevel: Int): Collection { + val titleIDs = mutableListOf() + titleStore.entries.stream().filter { (_, titleItem) -> + titleItem.avatarLevel <= avatarLevel && (titleItem.wwwLevel.isEmpty() || levelIDs.any { it == titleItem.wwwLevel }) && titleItem.noteIDs?.all { noteID -> noteIDs.any { it == noteID } } != false + }.collect(Collectors.groupingBy { it.value.title }).values.forEach { titleItems -> + if (titleItems.size > 1) { + titleIDs.add(titleItems.maxBy { it.value.titleLevel }.key) + } else { + titleIDs.add(titleItems[0].key) + } + } + return titleIDs + } + + fun getTitles(levelID: String, language: String): Array { + val titleIDs = mutableListOf() + titleStore.entries.stream().filter { (_, titleItem) -> levelID == titleItem.wwwLevel } + .collect(Collectors.groupingBy { it.value.title }).values.forEach { titleItems -> + if (titleItems.size > 1) { + titleIDs.add(titleItems.maxBy { it.value.titleLevel }.key) + } else { + titleIDs.add(titleItems[0].key) + } + } + return titleIDs.map { + val titleItem = titleStore[it]!! + + object { + val titleID = it + val title = when (language) { + "ko-KR" -> titleItem.title1042 + else -> titleItem.title + } + val titleColor = titleItem.titleColor + } + }.toTypedArray() + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/Translator.kt b/src/main/kotlin/net/taehui/twilight/system/Translator.kt new file mode 100644 index 0000000..bb26d52 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/Translator.kt @@ -0,0 +1,82 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.databind.ObjectMapper +import com.github.pemistahl.lingua.api.Language +import com.github.pemistahl.lingua.api.LanguageDetectorBuilder +import net.taehui.twilight.JSON +import net.taehui.twilight.Logger +import org.apache.hc.client5.http.HttpResponseException +import org.apache.hc.client5.http.classic.methods.HttpPost +import org.apache.hc.client5.http.entity.UrlEncodedFormEntity +import org.apache.hc.client5.http.impl.classic.BasicHttpClientResponseHandler +import org.apache.hc.client5.http.impl.classic.HttpClients +import org.apache.hc.core5.http.message.BasicNameValuePair +import java.nio.charset.StandardCharsets +import java.util.concurrent.CompletableFuture + +object Translator { + private val languageSystem = + LanguageDetectorBuilder.fromLanguages(Language.KOREAN, Language.ENGLISH, Language.JAPANESE).build() + + fun translate( + language: String, + text: String, + logger: Logger + ): CompletableFuture { + return if (text.length > 766) CompletableFuture.completedFuture( + text + ) else { + val textLanguage = when (languageSystem.detectLanguageOf(text)) { + Language.KOREAN -> "ko" + Language.ENGLISH -> "en" + Language.JAPANESE -> "ja" + Language.CHINESE -> "zh-CN" + Language.VIETNAMESE -> "vi" + Language.INDONESIAN -> "id" + Language.THAI -> "th" + Language.DUTCH -> "de" + Language.RUSSIAN -> "ru" + Language.SPANISH -> "es" + Language.ITALIAN -> "it" + Language.FRENCH -> "fr" + else -> "" + } + val targetLanguage = language.split('-')[0] + if (textLanguage.isEmpty() || textLanguage == "en" || textLanguage == targetLanguage) CompletableFuture.completedFuture( + text + ) else DB.loadTranslatedText( + text, + targetLanguage + ).thenApply { loadedTranslatedText -> + try { + loadedTranslatedText.ifEmpty { + HttpClients.createDefault().use { + val jm = ObjectMapper() + val dataPost = HttpPost("https://openapi.naver.com/v1/papago/n2mt") + dataPost.setHeader("X-Naver-Client-Id", Configure.nhn.nhnID) + dataPost.setHeader("X-Naver-Client-Secret", Configure.nhn.nhnPw) + dataPost.entity = UrlEncodedFormEntity( + listOf( + BasicNameValuePair("source", textLanguage), + BasicNameValuePair("target", targetLanguage), + BasicNameValuePair("text", text) + ), StandardCharsets.UTF_8 + ) + val translatedText = jm.readValue( + it.execute(dataPost, BasicHttpClientResponseHandler()), + JSON.N2MT::class.java + ).message.result.translatedText + DB.saveTranslatedText(text, targetLanguage, translatedText) + translatedText + } + } + } catch (e: HttpResponseException) { + if (e.statusCode != 429) { + logger.logFault(e) + } + text + } + } + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/ValveSystem.kt b/src/main/kotlin/net/taehui/twilight/system/ValveSystem.kt new file mode 100644 index 0000000..579f86f --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/ValveSystem.kt @@ -0,0 +1,17 @@ +package net.taehui.twilight.system + +import com.google.protobuf.ByteString +import net.taehui.twilight.Logger +import java.util.concurrent.ConcurrentHashMap + +object ValveSystem : Logger { + private val drawingStore = ConcurrentHashMap() + + fun putDrawing(avatarID: String, valveDrawing: ByteString) { + drawingStore[avatarID] = valveDrawing + } + + fun getDrawing(avatarID: String): ByteArray? { + return drawingStore[avatarID]?.toByteArray() + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/VoteSystem.kt b/src/main/kotlin/net/taehui/twilight/system/VoteSystem.kt new file mode 100644 index 0000000..97b0136 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/VoteSystem.kt @@ -0,0 +1,65 @@ +package net.taehui.twilight.system + +import com.fasterxml.jackson.databind.ObjectMapper +import net.taehui.twilight.Logger +import net.taehui.twilight.TwilightComponent +import org.apache.commons.io.FilenameUtils +import java.io.IOException +import java.nio.file.Files +import java.util.* + +object VoteSystem : Logger { + class VoteItem : Comparable { + var title = "" + var artist = "" + var genre = "" + var www = "" + + @JvmField + var isFavorite = false + + override fun compareTo(other: VoteItem): Int { + val isFavoriteData = other.isFavorite.compareTo(isFavorite) + return if (isFavoriteData != 0) { + isFavoriteData + } else title.compareTo(other.title) + } + } + + private val voteItemMap = TreeMap>() + var isLoading = false + + fun loadVote() { + isLoading = true + val jm = ObjectMapper() + try { + voteItemMap.clear() + Files.list(TwilightComponent.VOTE_ENTRY_PATH).use { + it.forEach { voteFilePath -> + val voteItems = jm.readValue(voteFilePath.toFile(), Array::class.java) + Arrays.sort(voteItems) + voteItemMap[FilenameUtils.removeExtension(voteFilePath.fileName.toString())] = voteItems + logInfo("Loaded Vote (${voteFilePath.fileName})") + + jm.writerWithDefaultPrettyPrinter().writeValue(voteFilePath.toFile(), voteItems) + logInfo("Saved Vote (${voteFilePath.fileName})") + } + } + } catch (e: IOException) { + logFault(e) + } finally { + isLoading = false + } + } + + val voteNames: List + get() { + val voteNames = voteItemMap.keys.filter { it != "etc." }.toMutableList() + voteNames.add("etc.") + return voteNames + } + + fun getVoteItems(voteName: String): Array? { + return voteItemMap[voteName] + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/Window.kt b/src/main/kotlin/net/taehui/twilight/system/Window.kt new file mode 100644 index 0000000..0fa7c54 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/Window.kt @@ -0,0 +1,43 @@ +package net.taehui.twilight.system + +import org.apache.logging.log4j.core.Core +import org.apache.logging.log4j.core.Layout +import org.apache.logging.log4j.core.LogEvent +import org.apache.logging.log4j.core.appender.AbstractAppender +import org.apache.logging.log4j.core.config.plugins.Plugin +import org.apache.logging.log4j.core.config.plugins.PluginAttribute +import org.apache.logging.log4j.core.config.plugins.PluginElement +import org.apache.logging.log4j.core.config.plugins.PluginFactory +import org.jline.reader.LineReader +import org.jline.reader.LineReaderBuilder +import org.jline.terminal.TerminalBuilder +import java.io.Serializable + +@Plugin(name = "Window", category = Core.CATEGORY_NAME) +class Window(name: String, layout: Layout) : + AbstractAppender(name, null, layout, true, null) { + val r: LineReader = LineReaderBuilder.builder().terminal(TerminalBuilder.builder().build()).build() + + init { + r.setOpt(LineReader.Option.DISABLE_EVENT_EXPANSION) + r.unsetOpt(LineReader.Option.INSERT_TAB) + } + + override fun append(event: LogEvent) { + r.printAbove(layout.toSerializable(event).toString()) + } + + companion object { + lateinit var window: Window + + @JvmStatic + @PluginFactory + fun getWindow( + @PluginAttribute("name") name: String, + @PluginElement("Layout") layout: Layout + ): Window { + window = Window(name, layout) + return window + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/system/WitSystem.kt b/src/main/kotlin/net/taehui/twilight/system/WitSystem.kt new file mode 100644 index 0000000..3479a7b --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/system/WitSystem.kt @@ -0,0 +1,53 @@ +package net.taehui.twilight.system + +import net.taehui.twilight.Logger +import java.time.LocalDateTime +import java.util.concurrent.* + +object WitSystem : Logger { + private val ses: ScheduledExecutorService = Executors.newSingleThreadScheduledExecutor { + Executors.defaultThreadFactory().newThread(it).apply { + isDaemon = true + } + } + private val witMap = + ConcurrentHashMap (() -> Unit)>>>() + + fun dispose() { + ses.shutdown() + ses.awaitTermination(1, TimeUnit.SECONDS) + } + + fun handleLoop(src: Any, date: LocalDateTime, loopCount: Int, toHandle: (LocalDateTime) -> Unit) { + if (loopCount != 0) { + witMap.getOrPut(src) { + CopyOnWriteArrayList() + }.add(Pair(date.plusSeconds(1)) { + toHandle(it) + ({ handleLoop(src, it.plusSeconds(1), loopCount - 1, toHandle) }) + }) + } + } + + fun wipeWit(src: Any) { + witMap.remove(src) + } + + fun handleSystem() { + ses.scheduleWithFixedDelay({ + val date = LocalDateTime.now() + witMap.forEach { (_, witValues) -> + witValues.forEach { + if (!date.isBefore(it.first)) { + try { + it.second(date)() + } catch (e: Throwable) { + logFault(e) + } + witValues.remove(it) + } + } + } + }, 0, 1, TimeUnit.SECONDS) + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/taehui/TaehuiAvatar.kt b/src/main/kotlin/net/taehui/twilight/taehui/TaehuiAvatar.kt new file mode 100644 index 0000000..d4e66d8 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/taehui/TaehuiAvatar.kt @@ -0,0 +1,103 @@ +package net.taehui.twilight.taehui + +import com.fasterxml.jackson.databind.ObjectMapper +import io.netty.channel.ChannelFutureListener +import io.netty.channel.ChannelHandlerContext +import io.netty.channel.SimpleChannelInboundHandler +import io.netty.handler.codec.http.* +import io.netty.util.CharsetUtil +import net.taehui.twilight.Logger +import net.taehui.twilight.Utility +import net.taehui.twilight.system.AvatarHandler +import net.taehui.twilight.system.Configure +import org.slf4j.LoggerFactory +import java.net.InetSocketAddress +import java.net.URLDecoder +import java.nio.charset.StandardCharsets +import java.nio.file.Files + +class TaehuiAvatar : SimpleChannelInboundHandler(), Logger { + class Software { + var date = "" + var hash = "" + var title = "" + var title64 = "" + } + + private var avatarIP = "" + + fun send(handler: ChannelHandlerContext) { + val r = DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NO_CONTENT) + val hs = r.headers() + hs[HttpHeaderNames.CONTENT_TYPE] = "application/text" + hs[HttpHeaderNames.CONTENT_ENCODING] = CharsetUtil.UTF_8 + handler.writeAndFlush(r).addListener(ChannelFutureListener.CLOSE) + } + + override fun channelActive(ctx: ChannelHandlerContext) { + avatarIP = (ctx.channel().remoteAddress() as InetSocketAddress).address.hostAddress + } + + public override fun channelRead0(ctx: ChannelHandlerContext, msg: FullHttpRequest) { + val path = URLDecoder.decode(msg.uri(), StandardCharsets.UTF_8) + val mode = msg.method() + logInfo("$mode $path") + if (mode == HttpMethod.PATCH) { + when (path) { + "/date" -> { + val data = msg.content().toString(StandardCharsets.UTF_8).split(" ".toRegex()) + var date = data[0] + val hash = data[1] + if (date.contains("!")) { + Configure.hash.clear() + } + date = date.replace("!", "") + Configure.hash.add(hash) + Configure.saveConfigure() + val jm = ObjectMapper() + val softwarePath = Configure.path.wwwPath.resolve(Configure.path.datePath) + val software = jm.readValue(Files.readString(softwarePath), Software::class.java) + software.date = date + software.hash = hash + Files.newBufferedWriter(softwarePath) + .use { jm.writerWithDefaultPrettyPrinter().writeValue(it, software) } + send(ctx) + } + + "/drawing" -> { + AvatarHandler.sendInvalidateAvatarDrawing(msg.content().toString(StandardCharsets.UTF_8)) + send(ctx) + } + + "/totem" -> { + AvatarHandler.handleNotSignIn(msg.content().toString(StandardCharsets.UTF_8)) + send(ctx) + } + + else -> ctx.writeAndFlush(DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_FOUND)) + .addListener( + ChannelFutureListener.CLOSE + ) + } + } else { + ctx.writeAndFlush(DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.METHOD_NOT_ALLOWED)) + .addListener( + ChannelFutureListener.CLOSE + ) + } + } + + override fun exceptionCaught(ctx: ChannelHandlerContext, cause: Throwable) { + logFault(cause) + } + + override fun logInfo(toNotify: String) { + LoggerFactory.getLogger(javaClass).info("[{}] {}", avatarIP, toNotify) + } + + override fun logFault(e: Throwable) { + if (Utility.isValidFault(e)) { + LoggerFactory.getLogger(javaClass).error("[{}] {}", avatarIP, Utility.getFault(e)) + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/taehui/TaehuiBoot.kt b/src/main/kotlin/net/taehui/twilight/taehui/TaehuiBoot.kt new file mode 100644 index 0000000..f4ba1aa --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/taehui/TaehuiBoot.kt @@ -0,0 +1,34 @@ +package net.taehui.twilight.taehui + +import io.netty.bootstrap.ServerBootstrap +import io.netty.channel.ChannelInitializer +import io.netty.channel.EventLoopGroup +import io.netty.channel.socket.ServerSocketChannel +import io.netty.channel.socket.SocketChannel +import io.netty.handler.codec.http.HttpClientCodec +import io.netty.handler.codec.http.HttpObjectAggregator +import io.netty.handler.codec.http.HttpServerCodec +import net.taehui.twilight.Logger + +class TaehuiBoot(eventLoopGroup: EventLoopGroup, eventChannel: Class) : Logger, Runnable { + private val mainBootstrap: ServerBootstrap + + init { + mainBootstrap = ServerBootstrap().group(eventLoopGroup).channel(eventChannel) + .childHandler(object : ChannelInitializer() { + public override fun initChannel(ch: SocketChannel) { + ch.pipeline() + .addLast(HttpServerCodec()) + .addLast(HttpObjectAggregator(Int.MAX_VALUE)) + .addLast(HttpClientCodec()) + .addLast(TaehuiAvatar()) + } + }) + } + + override fun run() { + logInfo("Loading Taehui") + mainBootstrap.bind(8300).channel().closeFuture() + .addListener { logInfo("Closed Taehui") } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/www/WwwAvatar.kt b/src/main/kotlin/net/taehui/twilight/www/WwwAvatar.kt new file mode 100644 index 0000000..3866016 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/www/WwwAvatar.kt @@ -0,0 +1,483 @@ +package net.taehui.twilight.www + +import com.fasterxml.jackson.databind.ObjectMapper +import io.netty.buffer.ByteBufUtil +import io.netty.buffer.Unpooled +import io.netty.channel.ChannelFutureListener +import io.netty.channel.ChannelHandlerContext +import io.netty.channel.SimpleChannelInboundHandler +import io.netty.handler.codec.http.* +import io.netty.util.CharsetUtil +import net.taehui.twilight.* +import net.taehui.twilight.system.* +import org.apache.commons.codec.binary.Hex +import org.apache.commons.compress.compressors.xz.XZCompressorInputStream +import org.apache.commons.io.IOUtils +import org.apache.hc.client5.http.classic.methods.HttpGet +import org.apache.hc.client5.http.impl.classic.HttpClients +import org.slf4j.LoggerFactory +import java.io.IOException +import java.net.URLDecoder +import java.nio.charset.StandardCharsets +import java.nio.file.Files +import java.security.MessageDigest +import java.util.concurrent.CompletableFuture +import kotlin.io.path.inputStream + +class WwwAvatar : SimpleChannelInboundHandler(), Logger { + private var avatarIP = "" + private var avatarEstimatedID = "" + + private fun getDefaultDrawingIf(drawing: ByteArray? = null): CompletableFuture { + return if (drawing != null) CompletableFuture.completedFuture(drawing) else logValueFuture { + try { + HttpClients.createDefault().use { + val dataGet = HttpGet(Configure.www.taehui + "/avatar/drawing") + dataGet.setHeader("X-Real-IP", avatarIP) + it.execute(dataGet, HCDataHandler()) + } + } catch (e: IOException) { + logFault(e) + null + } + } + } + + fun send(handler: ChannelHandlerContext, text: Any?) { + val r = DefaultFullHttpResponse( + HttpVersion.HTTP_1_1, + HttpResponseStatus.OK, + Unpooled.copiedBuffer(ObjectMapper().writeValueAsString(text), CharsetUtil.UTF_8) + ) + val hs = r.headers() + hs[HttpHeaderNames.CONTENT_TYPE] = "application/json" + hs[HttpHeaderNames.CONTENT_ENCODING] = CharsetUtil.UTF_8 + handler.writeAndFlush(r).addListener(ChannelFutureListener.CLOSE) + } + + fun send(handler: ChannelHandlerContext, text: Double) { + val r = DefaultFullHttpResponse( + HttpVersion.HTTP_1_1, + HttpResponseStatus.OK, + Unpooled.copiedBuffer(text.toString(), CharsetUtil.UTF_8) + ) + val hs = r.headers() + hs[HttpHeaderNames.CONTENT_TYPE] = "text/plain" + hs[HttpHeaderNames.CONTENT_ENCODING] = CharsetUtil.UTF_8 + handler.writeAndFlush(r).addListener(ChannelFutureListener.CLOSE) + } + + fun send(handler: ChannelHandlerContext, text: String) { + val r = DefaultFullHttpResponse( + HttpVersion.HTTP_1_1, HttpResponseStatus.OK, Unpooled.copiedBuffer( + text.toByteArray( + StandardCharsets.UTF_8 + ) + ) + ) + val hs = r.headers() + hs[HttpHeaderNames.CONTENT_TYPE] = "text/plain" + hs[HttpHeaderNames.CONTENT_ENCODING] = CharsetUtil.UTF_8 + handler.writeAndFlush(r).addListener(ChannelFutureListener.CLOSE) + } + + fun send(handler: ChannelHandlerContext, data: ByteArray?) { + if (data != null) { + handler.writeAndFlush( + DefaultFullHttpResponse( + HttpVersion.HTTP_1_1, HttpResponseStatus.OK, Unpooled.copiedBuffer(data) + ) + ).addListener( + ChannelFutureListener.CLOSE + ) + } else { + send204(handler) + } + } + + private fun send204(handler: ChannelHandlerContext) { + handler.writeAndFlush(DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NO_CONTENT)).addListener( + ChannelFutureListener.CLOSE + ) + } + + private fun send400(handler: ChannelHandlerContext) { + handler.writeAndFlush(DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.BAD_REQUEST)) + .addListener( + ChannelFutureListener.CLOSE + ) + } + + private fun send403(handler: ChannelHandlerContext) { + handler.writeAndFlush(DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.FORBIDDEN)).addListener( + ChannelFutureListener.CLOSE + ) + } + + private fun send404(handler: ChannelHandlerContext) { + handler.writeAndFlush(DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.NOT_FOUND)).addListener( + ChannelFutureListener.CLOSE + ) + } + + private val loggerID: String + get() { + val avatarID = if (avatarEstimatedID.isNotEmpty()) "$avatarEstimatedID?" else "" + return if (avatarID.isNotEmpty()) "$avatarIP (${avatarID})" else avatarIP + } + + public override fun channelRead0(ctx: ChannelHandlerContext, msg: FullHttpRequest) { + avatarIP = msg.headers()["X-Real-IP"] ?: "localhost" + avatarEstimatedID = History.getAvatarID(avatarIP) + val mode = msg.method() + if (avatarIP != "localhost") { + logInfo("$mode ${URLDecoder.decode(msg.uri(), StandardCharsets.UTF_8)}") + } + val data = QueryStringDecoder(msg.uri()) + when (mode) { + HttpMethod.GET -> { + val params = data.parameters().map { + Pair(it.key, it.value[0]) + }.toMap() + val language = params.getOrDefault("language", "en-US") + when (data.path()) { + "/qwilight/www/note" -> DB.getNote(params).thenAccept { send(ctx, it) } + + "/qwilight/www/comment" -> { + val noteID = params.getOrDefault("noteID", "") + if (BannedNote.isBanned(noteID)) { + send(ctx, object { + val favor = null + val totalFavor = 0 + val comments = null + }) + } else { + val avatarID = params.getOrDefault("avatarID", "") + val commentID = params.getOrDefault("commentID", "") + val target = params.getOrDefault("target", "false").toBoolean() + if (noteID.isEmpty()) { + send400(ctx) + } else { + if (commentID.isEmpty()) { + DB.getComment(noteID, avatarID, language, target, this).thenAccept { + send(ctx, it) + } + } else { + XZCompressorInputStream( + TwilightComponent.COMMENT_ENTRY_PATH.resolve( + noteID.substring( + 0, + noteID.indexOf(':') + ) + ).resolve("$commentID.xz") + .inputStream() + ).use { + send(ctx, IOUtils.toByteArray(it)) + } + } + } + } + } + + "/qwilight/www/avatar" -> DB.getAvatar(params).thenAccept { + if (it != null) { + send(ctx, it) + } else { + send204(ctx) + } + } + + "/qwilight/www/wow" -> DB.getWow().thenAccept { send(ctx, it) } + + "/qwilight/www/etc" -> { + DB.getEtc(language).thenAccept { send(ctx, it) } + } + + "/qwilight/www/level" -> { + val levelName = params.getOrDefault("levelName", "") + if (levelName.isEmpty()) { + val levelID = params.getOrDefault("levelID", "") + if (levelID.isEmpty()) { + if (params.containsKey("avatarID")) { + send(ctx, LevelSystem.getLevelNames(params.getOrDefault("avatarID", ""))) + } else { + val avatarIDMe = params.getOrDefault("avatarIDMe", "") + if (avatarIDMe.isEmpty()) { + send(ctx, object { + val avatars = LevelSystem.avatars + val levelIDs = emptyArray() + }) + } else { + DB.getClearedLevelIDs( + avatarIDMe + ).thenAccept { + send(ctx, object { + val avatars = LevelSystem.avatars + val levelIDs = it + }) + } + } + } + } else { + LevelSystem.getLevelItem(levelID)?.let { levelItem -> + DB.getLevelNote(levelItem).thenAccept { + send( + ctx, object { + val levelNote = it + val stand = levelItem.stand + val point = levelItem.point + val band = levelItem.band + val judgments = levelItem.judgments + val autoMode = levelItem.autoMode + val noteSaltMode = levelItem.noteSaltMode + val audioMultiplier = levelItem.audioMultiplier + val faintNoteMode = levelItem.faintNoteMode + val judgmentMode = levelItem.judgmentMode + val hitPointsMode = levelItem.hitPointsMode + val noteMobilityMode = levelItem.noteMobilityMode + val longNoteMode = levelItem.longNoteMode + val inputFavorMode = levelItem.inputFavorMode + val noteModifyMode = levelItem.noteModifyMode + val bpmMode = levelItem.bpmMode + val waveMode = levelItem.waveMode + val setNoteMode = levelItem.setNoteMode + val lowestJudgmentConditionMode = levelItem.lowestJudgmentConditionMode + val allowPause = levelItem.allowPause + val titles = TitleSystem.getTitles(levelID, language) + val edgeIDs = EdgeSystem.getEdgeIDs(levelID) + } + ) + } + } + } + } else { + val levelGroup = LevelSystem.getLevelGroup(levelName) + if (levelGroup != null) { + DB.getLevels( + levelGroup + ).thenAccept { send(ctx, it) } + } + } + } + + "/qwilight/www/vote" -> { + val voteName = params.getOrDefault("voteName", "") + if (voteName.isEmpty()) { + send(ctx, VoteSystem.voteNames) + } else { + send(ctx, VoteSystem.getVoteItems(voteName)) + } + } + + "/qwilight/www/sites" -> send(ctx, SiteHandler.getCalledSites()) + + "/qwilight/www/defaultNoteDate" -> { + val defaultNoteDate = Configure.defaultNoteDate + if (defaultNoteDate > params.getOrDefault("date", "0").toLong()) { + send(ctx, object { + val date = defaultNoteDate + }) + } else { + send204(ctx) + } + } + + "/qwilight/www/defaultUIDate" -> { + val defaultUIDate = Configure.defaultUIDate + if (defaultUIDate > params.getOrDefault("date", "0").toLong()) { + send(ctx, object { + val date = defaultUIDate + }) + } else { + send204(ctx) + } + } + + "/qwilight/www/title" -> DB.getTitle(params).thenAccept { + if (it != null) { + send(ctx, it) + } else { + send204(ctx) + } + } + + "/qwilight/www/titles" -> DB.getTitles( + params + ).thenAccept { send(ctx, it) } + + "/qwilight/www/edge" -> { + val drawing = EdgeSystem.getDrawing(params.getOrDefault("edgeID", "")) + if (drawing != null) { + send(ctx, drawing) + } else { + send204(ctx) + } + } + + "/qwilight/www/edges" -> DB.getEdgeIDs( + params + ).thenAccept { send(ctx, it) } + + "/qwilight/www/drawing" -> { + val avatarID = Utility.getDefaultAvatarID(params.getOrDefault("avatarID", "")) + val drawingVariety = params.getOrDefault("drawingVariety", "") + val abilityClass5K = params.getOrDefault("abilityClass5K", "") + val abilityClass7K = params.getOrDefault("abilityClass7K", "") + val abilityClass9K = params.getOrDefault("abilityClass9K", "") + if (drawingVariety.isNotEmpty()) { + if (avatarID.isEmpty()) { + when (drawingVariety) { + "0" -> getDefaultDrawingIf().thenAccept { send(ctx, it) } + "2" -> send(ctx, EdgeSystem.getDrawing("Default")) + else -> send400(ctx) + } + } else if (avatarID.startsWith("*")) { + when (drawingVariety) { + "0" -> getDefaultDrawingIf(ValveSystem.getDrawing(avatarID)).thenAccept { + send( + ctx, + it + ) + } + + "2" -> send(ctx, EdgeSystem.getDrawing("Default")) + else -> send400(ctx) + } + } else if (avatarID.startsWith("$")) { + when (drawingVariety) { + "0" -> getDefaultDrawingIf(PlatformSystem.getDrawing(avatarID)).thenAccept { + send( + ctx, + it + ) + } + + "2" -> send(ctx, EdgeSystem.getDrawing("Default")) + else -> send400(ctx) + } + } else { + when (drawingVariety) { + "0" -> logFuture { + HttpClients.createDefault().use { + val dataGet = HttpGet( + Configure.www.taehui + "/avatar/drawing/" + Utility.getDefaultAvatarID( + avatarID + ) + ) + dataGet.setHeader("X-Real-IP", avatarIP) + send(ctx, it.execute(dataGet, HCDataHandler())) + } + } + + "2" -> logFuture { + val edge = DB.getAvatarEdge(Utility.getDefaultAvatarID(avatarID)) + send(ctx, EdgeSystem.getDrawing(edge)) + } + + else -> send400(ctx) + } + } + } else if (abilityClass5K.isNotEmpty()) { + send( + ctx, + AbilityClassSystem.getAbilityClass( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_5K, + abilityClass5K.toDouble() + ) + ) + } else if (abilityClass7K.isNotEmpty()) { + send( + ctx, + AbilityClassSystem.getAbilityClass( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_7K, + abilityClass7K.toDouble() + ) + ) + } else if (abilityClass9K.isNotEmpty()) { + send( + ctx, + AbilityClassSystem.getAbilityClass( + AbilityClassSystem.AbilityClassVariety.ABILITY_CLASS_9K, + abilityClass9K.toDouble() + ) + ) + } else { + send400(ctx) + } + } + + else -> send404(ctx) + } + } + + HttpMethod.POST -> { + when (data.path()) { + "/qwilight/www/fault" -> { + QwilightLogging(loggerID).logInfo( + msg.content().toString(StandardCharsets.UTF_8) + ) + ctx.writeAndFlush(DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.CREATED)) + .addListener( + ChannelFutureListener.CLOSE + ) + } + + "/qwilight/www/note" -> { + val noteFileContents = ByteBufUtil.getBytes(msg.content()) + val hashComputer512 = MessageDigest.getInstance("SHA-512") + hashComputer512.update(noteFileContents) + val hashComputer128 = MessageDigest.getInstance("MD5") + hashComputer128.update(noteFileContents) + val hashComputer256 = MessageDigest.getInstance("SHA-256") + hashComputer256.update(noteFileContents) + val noteID512 = Hex.encodeHexString(hashComputer512.digest()) + val noteID128 = Hex.encodeHexString(hashComputer128.digest()) + val noteID256 = Hex.encodeHexString(hashComputer256.digest()) + val targetComputing = BaseCompiler.handleCompile(noteFileContents) + if (targetComputing.isBanned || BannedNote.isBanned(noteID512)) { + send403(ctx) + } else { + logFuture { + Files.write(TwilightComponent.NOTE_ENTRY_PATH.resolve(noteID512), noteFileContents) + DB.setNote( + "$noteID512:0", noteID128, noteID256, targetComputing + ) + send204(ctx) + } + } + } + + else -> { + send404(ctx) + } + } + } + + else -> { + ctx.writeAndFlush( + DefaultFullHttpResponse( + HttpVersion.HTTP_1_1, + HttpResponseStatus.METHOD_NOT_ALLOWED + ) + ) + .addListener( + ChannelFutureListener.CLOSE + ) + } + } + } + + override fun exceptionCaught(ctx: ChannelHandlerContext, cause: Throwable) { + logFault(cause) + } + + override fun logInfo(toNotify: String) { + LoggerFactory.getLogger(javaClass).info("[{}] {}", loggerID, toNotify) + } + + override fun logFault(e: Throwable) { + if (Utility.isValidFault(e)) { + LoggerFactory.getLogger(javaClass).error("[{}] {}", avatarIP, Utility.getFault(e)) + } + } +} \ No newline at end of file diff --git a/src/main/kotlin/net/taehui/twilight/www/WwwBoot.kt b/src/main/kotlin/net/taehui/twilight/www/WwwBoot.kt new file mode 100644 index 0000000..8e1b778 --- /dev/null +++ b/src/main/kotlin/net/taehui/twilight/www/WwwBoot.kt @@ -0,0 +1,34 @@ +package net.taehui.twilight.www + +import io.netty.bootstrap.ServerBootstrap +import io.netty.channel.ChannelInitializer +import io.netty.channel.EventLoopGroup +import io.netty.channel.socket.ServerSocketChannel +import io.netty.channel.socket.SocketChannel +import io.netty.handler.codec.http.HttpClientCodec +import io.netty.handler.codec.http.HttpObjectAggregator +import io.netty.handler.codec.http.HttpServerCodec +import net.taehui.twilight.Logger + +class WwwBoot(eventLoopGroup: EventLoopGroup, eventChannel: Class) : Logger, Runnable { + private val mainBootstrap: ServerBootstrap + + init { + mainBootstrap = ServerBootstrap().group(eventLoopGroup).channel(eventChannel) + .childHandler(object : ChannelInitializer() { + public override fun initChannel(ch: SocketChannel) { + ch.pipeline() + .addLast(HttpServerCodec()) + .addLast(HttpObjectAggregator(Int.MAX_VALUE)) + .addLast(HttpClientCodec()) + .addLast(WwwAvatar()) + } + }) + } + + override fun run() { + logInfo("Loading Www") + mainBootstrap.bind(7301).channel().closeFuture() + .addListener { logInfo("Closed Www") } + } +} \ No newline at end of file diff --git a/src/main/resources/Language.json b/src/main/resources/Language.json new file mode 100644 index 0000000..c589079 --- /dev/null +++ b/src/main/resources/Language.json @@ -0,0 +1,142 @@ +{ + "abilityUp": { + "ko-KR": "레이팅 %.2f Point 얻음", + "en-US": "Rating %.2f Point Obtained" + }, + "abilityUpMini": { + "ko-KR": "레이팅 < 0.01 Point 얻음", + "en-US": "Rating < 0.01 Point Obtained" + }, + "alreadyBundle": { + "ko-KR": "동일한 이름을 가진 꾸러미가 서버에 이미 존재합니다.", + "en-US": "A package with the same name already exists on the server." + }, + "alreadyEnteredSite": { + "ko-KR": "이미 참가한 방입니다.", + "en-US": "You've already joined this room." + }, + "alreadyUbuntu": { + "ko-KR": "이미 친구입니다.", + "en-US": "We're already friends." + }, + "availableAvatarNote": { + "ko-KR": "읽지 않은 %d개의 메시지를 불로그에서 확인하세요", + "en-US": "Check your blog for %d unread messages" + }, + "bannedIP": { + "ko-KR": "차단된 IP 입니다.", + "en-US": "Blocked IP." + }, + "bundleNotify": { + "ko-KR": "%s님이 %s의 다운로드를 시작합니다.", + "en-US": "%s will start downloading %s." + }, + "failedExileCompetence": { + "ko-KR": "등급이 낮아서 추방이 불가능합니다.", + "en-US": "It is impossible to deport because of the low grade." + }, + "hasNotComment": { + "ko-KR": "코멘트를 등록하려면 먼저 클리어하세요", + "en-US": "Clear first to register comments" + }, + "hasNotLength": { + "ko-KR": "온라인 꾸러미 저장소의 용량이 부족합니다.", + "en-US": "Insufficient capacity for online package storage." + }, + "ioAvatarIsYou": { + "ko-KR": "다른 사용자에게 관전을 요청하세요", + "en-US": "Ask another user to watch" + }, + "lowerCompetenceAsIO": { + "ko-KR": "상대방이 관전 요청을 거절한 상태입니다.", + "en-US": "The other party has declined the viewing request." + }, + "lowerCompetenceAsSave": { + "ko-KR": "권한이 부족합니다.", + "en-US": "Insufficient privileges." + }, + "lowerCompetenceAsSilentSite": { + "ko-KR": "상대방이 1대1 대화 요청을 거절한 상태입니다.", + "en-US": "The other party has declined the one-on-one conversation request." + }, + "millisNotSuitable": { + "ko-KR": "대화방에 도배하지 마세요", + "en-US": "Don't flood the chat room" + }, + "netSiteCommentNotAvailable": { + "ko-KR": "게임 결과가 아직 존재하지 않습니다.", + "en-US": "Game results do not yet exist." + }, + "pause": { + "ko-KR": "서버 점검중입니다.", + "en-US": "Checking the server." + }, + "savedAsNetBundle": { + "ko-KR": "공유 받기를 눌러서 %s를 다운로드 받으세요", + "en-US": "Click Get Share to download %s" + }, + "savedDefaultNote": { + "ko-KR": "모든 기본곡을 성공적으로 받음", + "en-US": "Successfully received all basic songs" + }, + "savedDefaultUI": { + "ko-KR": "모든 추가 스킨을 성공적으로 받음", + "en-US": "Successfully received all additional skins" + }, + "signInAsEnter": { + "ko-KR": "이 방에 참가하려면 먼저 로그인하세요", + "en-US": "Please log in first to join this room" + }, + "silentSiteAvatarIsNotSignedIn": { + "ko-KR": "비회원과 1대1 대화는 불가능합니다.", + "en-US": "One-on-one conversation with non-members is not possible." + }, + "silentSiteAvatarIsYou": { + "ko-KR": "다른 사용자에게 1대1 대화를 요청하세요", + "en-US": "Ask other users to have a one-on-one conversation" + }, + "siteHasNotSeat": { + "ko-KR": "방이 만원이라 입장이 불가능합니다.", + "en-US": "You can't enter because the room is full." + }, + "siteNameNotValid": { + "ko-KR": "올바르지 않은 방 이름입니다.", + "en-US": "Invalid room name." + }, + "siteNotAvailable": { + "ko-KR": "더 이상 방이 존재하지 않습니다.", + "en-US": "The room no longer exists." + }, + "ubuntuIsYou": { + "ko-KR": "다른 사용자를 친구 추가하세요", + "en-US": "Add another user as a friend" + }, + "ubuntuNotify": { + "ko-KR": "%s님이 접속함", + "en-US": "%s logged in" + }, + "unavailableAvatar": { + "ko-KR": "탈퇴한 회원입니다.", + "en-US": "You are a member who has withdrawn." + }, + "unavailableDate": { + "ko-KR": "게임 설정에서 업데이트 후 접속 가능합니다.", + "en-US": "You can access it after updating it in the game settings." + }, + "unavailableValveDate": { + "ko-KR": "스팀에서 업데이트 후 접속 가능합니다.", + "en-US": "You can access it after updating it on Steam." + }, + "wrongAllowedPostableItems": { + "ko-KR": "아이템을 하나 이상 선택하세요", + "en-US": "Please select at least one item" + }, + "wrongAvatar": { + "ko-KR": "올바르지 않은 계정입니다.", + "en-US": "This account is not valid." + }, + "wrongSiteCipher": { + "ko-KR": "올바르지 않은 방 비밀번호입니다.", + "en-US": "Invalid room password." + } +} \ No newline at end of file diff --git a/src/main/resources/abilityClass5K/A+1.png b/src/main/resources/abilityClass5K/A+1.png new file mode 100644 index 0000000..8e1da68 --- /dev/null +++ b/src/main/resources/abilityClass5K/A+1.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A+2.png b/src/main/resources/abilityClass5K/A+2.png new file mode 100644 index 0000000..110174c --- /dev/null +++ b/src/main/resources/abilityClass5K/A+2.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A+3.png b/src/main/resources/abilityClass5K/A+3.png new file mode 100644 index 0000000..6fc4e3d --- /dev/null +++ b/src/main/resources/abilityClass5K/A+3.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A+4.png b/src/main/resources/abilityClass5K/A+4.png new file mode 100644 index 0000000..a3ff07d --- /dev/null +++ b/src/main/resources/abilityClass5K/A+4.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A+5.png b/src/main/resources/abilityClass5K/A+5.png new file mode 100644 index 0000000..ebefba3 --- /dev/null +++ b/src/main/resources/abilityClass5K/A+5.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A1.png b/src/main/resources/abilityClass5K/A1.png new file mode 100644 index 0000000..a566142 --- /dev/null +++ b/src/main/resources/abilityClass5K/A1.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A2.png b/src/main/resources/abilityClass5K/A2.png new file mode 100644 index 0000000..cd5addf --- /dev/null +++ b/src/main/resources/abilityClass5K/A2.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A3.png b/src/main/resources/abilityClass5K/A3.png new file mode 100644 index 0000000..93655d4 --- /dev/null +++ b/src/main/resources/abilityClass5K/A3.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A4.png b/src/main/resources/abilityClass5K/A4.png new file mode 100644 index 0000000..6a3e787 --- /dev/null +++ b/src/main/resources/abilityClass5K/A4.png Binary files differ diff --git a/src/main/resources/abilityClass5K/A5.png b/src/main/resources/abilityClass5K/A5.png new file mode 100644 index 0000000..5cb288b --- /dev/null +++ b/src/main/resources/abilityClass5K/A5.png Binary files differ diff --git a/src/main/resources/abilityClass5K/B1.png b/src/main/resources/abilityClass5K/B1.png new file mode 100644 index 0000000..522216d --- /dev/null +++ b/src/main/resources/abilityClass5K/B1.png Binary files differ diff --git a/src/main/resources/abilityClass5K/B2.png b/src/main/resources/abilityClass5K/B2.png new file mode 100644 index 0000000..a412478 --- /dev/null +++ b/src/main/resources/abilityClass5K/B2.png Binary files differ diff --git a/src/main/resources/abilityClass5K/B3.png b/src/main/resources/abilityClass5K/B3.png new file mode 100644 index 0000000..fc7ae4b --- /dev/null +++ b/src/main/resources/abilityClass5K/B3.png Binary files differ diff --git a/src/main/resources/abilityClass5K/B4.png b/src/main/resources/abilityClass5K/B4.png new file mode 100644 index 0000000..0b0e6ce --- /dev/null +++ b/src/main/resources/abilityClass5K/B4.png Binary files differ diff --git a/src/main/resources/abilityClass5K/B5.png b/src/main/resources/abilityClass5K/B5.png new file mode 100644 index 0000000..071bef9 --- /dev/null +++ b/src/main/resources/abilityClass5K/B5.png Binary files differ diff --git a/src/main/resources/abilityClass5K/C1.png b/src/main/resources/abilityClass5K/C1.png new file mode 100644 index 0000000..a94505c --- /dev/null +++ b/src/main/resources/abilityClass5K/C1.png Binary files differ diff --git a/src/main/resources/abilityClass5K/C2.png b/src/main/resources/abilityClass5K/C2.png new file mode 100644 index 0000000..0bb52fe --- /dev/null +++ b/src/main/resources/abilityClass5K/C2.png Binary files differ diff --git a/src/main/resources/abilityClass5K/C3.png b/src/main/resources/abilityClass5K/C3.png new file mode 100644 index 0000000..2a445e3 --- /dev/null +++ b/src/main/resources/abilityClass5K/C3.png Binary files differ diff --git a/src/main/resources/abilityClass5K/C4.png b/src/main/resources/abilityClass5K/C4.png new file mode 100644 index 0000000..718a208 --- /dev/null +++ b/src/main/resources/abilityClass5K/C4.png Binary files differ diff --git a/src/main/resources/abilityClass5K/C5.png b/src/main/resources/abilityClass5K/C5.png new file mode 100644 index 0000000..583a62f --- /dev/null +++ b/src/main/resources/abilityClass5K/C5.png Binary files differ diff --git a/src/main/resources/abilityClass5K/D1.png b/src/main/resources/abilityClass5K/D1.png new file mode 100644 index 0000000..4d68105 --- /dev/null +++ b/src/main/resources/abilityClass5K/D1.png Binary files differ diff --git a/src/main/resources/abilityClass5K/D2.png b/src/main/resources/abilityClass5K/D2.png new file mode 100644 index 0000000..437f9d7 --- /dev/null +++ b/src/main/resources/abilityClass5K/D2.png Binary files differ diff --git a/src/main/resources/abilityClass5K/D3.png b/src/main/resources/abilityClass5K/D3.png new file mode 100644 index 0000000..c08dbc4 --- /dev/null +++ b/src/main/resources/abilityClass5K/D3.png Binary files differ diff --git a/src/main/resources/abilityClass5K/D4.png b/src/main/resources/abilityClass5K/D4.png new file mode 100644 index 0000000..4c58112 --- /dev/null +++ b/src/main/resources/abilityClass5K/D4.png Binary files differ diff --git a/src/main/resources/abilityClass5K/D5.png b/src/main/resources/abilityClass5K/D5.png new file mode 100644 index 0000000..97a9320 --- /dev/null +++ b/src/main/resources/abilityClass5K/D5.png Binary files differ diff --git a/src/main/resources/abilityClass5K/F.png b/src/main/resources/abilityClass5K/F.png new file mode 100644 index 0000000..7ac5a3e --- /dev/null +++ b/src/main/resources/abilityClass5K/F.png Binary files differ diff --git a/src/main/resources/abilityClass5K/S+.png b/src/main/resources/abilityClass5K/S+.png new file mode 100644 index 0000000..a4ce2f3 --- /dev/null +++ b/src/main/resources/abilityClass5K/S+.png Binary files differ diff --git a/src/main/resources/abilityClass5K/S.png b/src/main/resources/abilityClass5K/S.png new file mode 100644 index 0000000..c51ee68 --- /dev/null +++ b/src/main/resources/abilityClass5K/S.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A+1.png b/src/main/resources/abilityClass7K/A+1.png new file mode 100644 index 0000000..60709fe --- /dev/null +++ b/src/main/resources/abilityClass7K/A+1.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A+2.png b/src/main/resources/abilityClass7K/A+2.png new file mode 100644 index 0000000..3d3395b --- /dev/null +++ b/src/main/resources/abilityClass7K/A+2.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A+3.png b/src/main/resources/abilityClass7K/A+3.png new file mode 100644 index 0000000..ef25008 --- /dev/null +++ b/src/main/resources/abilityClass7K/A+3.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A+4.png b/src/main/resources/abilityClass7K/A+4.png new file mode 100644 index 0000000..cac5432 --- /dev/null +++ b/src/main/resources/abilityClass7K/A+4.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A+5.png b/src/main/resources/abilityClass7K/A+5.png new file mode 100644 index 0000000..fa20543 --- /dev/null +++ b/src/main/resources/abilityClass7K/A+5.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A1.png b/src/main/resources/abilityClass7K/A1.png new file mode 100644 index 0000000..000b75d --- /dev/null +++ b/src/main/resources/abilityClass7K/A1.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A2.png b/src/main/resources/abilityClass7K/A2.png new file mode 100644 index 0000000..e27fc19 --- /dev/null +++ b/src/main/resources/abilityClass7K/A2.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A3.png b/src/main/resources/abilityClass7K/A3.png new file mode 100644 index 0000000..d4942f5 --- /dev/null +++ b/src/main/resources/abilityClass7K/A3.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A4.png b/src/main/resources/abilityClass7K/A4.png new file mode 100644 index 0000000..ae6e4c5 --- /dev/null +++ b/src/main/resources/abilityClass7K/A4.png Binary files differ diff --git a/src/main/resources/abilityClass7K/A5.png b/src/main/resources/abilityClass7K/A5.png new file mode 100644 index 0000000..9cd6daf --- /dev/null +++ b/src/main/resources/abilityClass7K/A5.png Binary files differ diff --git a/src/main/resources/abilityClass7K/B1.png b/src/main/resources/abilityClass7K/B1.png new file mode 100644 index 0000000..03c1223 --- /dev/null +++ b/src/main/resources/abilityClass7K/B1.png Binary files differ diff --git a/src/main/resources/abilityClass7K/B2.png b/src/main/resources/abilityClass7K/B2.png new file mode 100644 index 0000000..8aaedef --- /dev/null +++ b/src/main/resources/abilityClass7K/B2.png Binary files differ diff --git a/src/main/resources/abilityClass7K/B3.png b/src/main/resources/abilityClass7K/B3.png new file mode 100644 index 0000000..eb62f48 --- /dev/null +++ b/src/main/resources/abilityClass7K/B3.png Binary files differ diff --git a/src/main/resources/abilityClass7K/B4.png b/src/main/resources/abilityClass7K/B4.png new file mode 100644 index 0000000..1d9f590 --- /dev/null +++ b/src/main/resources/abilityClass7K/B4.png Binary files differ diff --git a/src/main/resources/abilityClass7K/B5.png b/src/main/resources/abilityClass7K/B5.png new file mode 100644 index 0000000..fd8a806 --- /dev/null +++ b/src/main/resources/abilityClass7K/B5.png Binary files differ diff --git a/src/main/resources/abilityClass7K/C1.png b/src/main/resources/abilityClass7K/C1.png new file mode 100644 index 0000000..dd7dbd7 --- /dev/null +++ b/src/main/resources/abilityClass7K/C1.png Binary files differ diff --git a/src/main/resources/abilityClass7K/C2.png b/src/main/resources/abilityClass7K/C2.png new file mode 100644 index 0000000..1ff004a --- /dev/null +++ b/src/main/resources/abilityClass7K/C2.png Binary files differ diff --git a/src/main/resources/abilityClass7K/C3.png b/src/main/resources/abilityClass7K/C3.png new file mode 100644 index 0000000..ced4c1d --- /dev/null +++ b/src/main/resources/abilityClass7K/C3.png Binary files differ diff --git a/src/main/resources/abilityClass7K/C4.png b/src/main/resources/abilityClass7K/C4.png new file mode 100644 index 0000000..7cacbd5 --- /dev/null +++ b/src/main/resources/abilityClass7K/C4.png Binary files differ diff --git a/src/main/resources/abilityClass7K/C5.png b/src/main/resources/abilityClass7K/C5.png new file mode 100644 index 0000000..70cc5da --- /dev/null +++ b/src/main/resources/abilityClass7K/C5.png Binary files differ diff --git a/src/main/resources/abilityClass7K/D1.png b/src/main/resources/abilityClass7K/D1.png new file mode 100644 index 0000000..013deed --- /dev/null +++ b/src/main/resources/abilityClass7K/D1.png Binary files differ diff --git a/src/main/resources/abilityClass7K/D2.png b/src/main/resources/abilityClass7K/D2.png new file mode 100644 index 0000000..45b1ea7 --- /dev/null +++ b/src/main/resources/abilityClass7K/D2.png Binary files differ diff --git a/src/main/resources/abilityClass7K/D3.png b/src/main/resources/abilityClass7K/D3.png new file mode 100644 index 0000000..0e4f204 --- /dev/null +++ b/src/main/resources/abilityClass7K/D3.png Binary files differ diff --git a/src/main/resources/abilityClass7K/D4.png b/src/main/resources/abilityClass7K/D4.png new file mode 100644 index 0000000..647d43a --- /dev/null +++ b/src/main/resources/abilityClass7K/D4.png Binary files differ diff --git a/src/main/resources/abilityClass7K/D5.png b/src/main/resources/abilityClass7K/D5.png new file mode 100644 index 0000000..486094f --- /dev/null +++ b/src/main/resources/abilityClass7K/D5.png Binary files differ diff --git a/src/main/resources/abilityClass7K/F.png b/src/main/resources/abilityClass7K/F.png new file mode 100644 index 0000000..7ac5a3e --- /dev/null +++ b/src/main/resources/abilityClass7K/F.png Binary files differ diff --git a/src/main/resources/abilityClass7K/S+.png b/src/main/resources/abilityClass7K/S+.png new file mode 100644 index 0000000..17013e9 --- /dev/null +++ b/src/main/resources/abilityClass7K/S+.png Binary files differ diff --git a/src/main/resources/abilityClass7K/S.png b/src/main/resources/abilityClass7K/S.png new file mode 100644 index 0000000..bf11d9b --- /dev/null +++ b/src/main/resources/abilityClass7K/S.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A+1.png b/src/main/resources/abilityClass9K/A+1.png new file mode 100644 index 0000000..fa7ee1a --- /dev/null +++ b/src/main/resources/abilityClass9K/A+1.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A+2.png b/src/main/resources/abilityClass9K/A+2.png new file mode 100644 index 0000000..2f5baad --- /dev/null +++ b/src/main/resources/abilityClass9K/A+2.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A+3.png b/src/main/resources/abilityClass9K/A+3.png new file mode 100644 index 0000000..10f07e7 --- /dev/null +++ b/src/main/resources/abilityClass9K/A+3.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A+4.png b/src/main/resources/abilityClass9K/A+4.png new file mode 100644 index 0000000..f2aa1ea --- /dev/null +++ b/src/main/resources/abilityClass9K/A+4.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A+5.png b/src/main/resources/abilityClass9K/A+5.png new file mode 100644 index 0000000..3085262 --- /dev/null +++ b/src/main/resources/abilityClass9K/A+5.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A1.png b/src/main/resources/abilityClass9K/A1.png new file mode 100644 index 0000000..ee746b4 --- /dev/null +++ b/src/main/resources/abilityClass9K/A1.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A2.png b/src/main/resources/abilityClass9K/A2.png new file mode 100644 index 0000000..892a005 --- /dev/null +++ b/src/main/resources/abilityClass9K/A2.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A3.png b/src/main/resources/abilityClass9K/A3.png new file mode 100644 index 0000000..4e716ec --- /dev/null +++ b/src/main/resources/abilityClass9K/A3.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A4.png b/src/main/resources/abilityClass9K/A4.png new file mode 100644 index 0000000..85e3ade --- /dev/null +++ b/src/main/resources/abilityClass9K/A4.png Binary files differ diff --git a/src/main/resources/abilityClass9K/A5.png b/src/main/resources/abilityClass9K/A5.png new file mode 100644 index 0000000..6960224 --- /dev/null +++ b/src/main/resources/abilityClass9K/A5.png Binary files differ diff --git a/src/main/resources/abilityClass9K/B1.png b/src/main/resources/abilityClass9K/B1.png new file mode 100644 index 0000000..5251df9 --- /dev/null +++ b/src/main/resources/abilityClass9K/B1.png Binary files differ diff --git a/src/main/resources/abilityClass9K/B2.png b/src/main/resources/abilityClass9K/B2.png new file mode 100644 index 0000000..27a81bf --- /dev/null +++ b/src/main/resources/abilityClass9K/B2.png Binary files differ diff --git a/src/main/resources/abilityClass9K/B3.png b/src/main/resources/abilityClass9K/B3.png new file mode 100644 index 0000000..16d792b --- /dev/null +++ b/src/main/resources/abilityClass9K/B3.png Binary files differ diff --git a/src/main/resources/abilityClass9K/B4.png b/src/main/resources/abilityClass9K/B4.png new file mode 100644 index 0000000..4686de1 --- /dev/null +++ b/src/main/resources/abilityClass9K/B4.png Binary files differ diff --git a/src/main/resources/abilityClass9K/B5.png b/src/main/resources/abilityClass9K/B5.png new file mode 100644 index 0000000..769bf02 --- /dev/null +++ b/src/main/resources/abilityClass9K/B5.png Binary files differ diff --git a/src/main/resources/abilityClass9K/C1.png b/src/main/resources/abilityClass9K/C1.png new file mode 100644 index 0000000..6e1d98a --- /dev/null +++ b/src/main/resources/abilityClass9K/C1.png Binary files differ diff --git a/src/main/resources/abilityClass9K/C2.png b/src/main/resources/abilityClass9K/C2.png new file mode 100644 index 0000000..7f38e47 --- /dev/null +++ b/src/main/resources/abilityClass9K/C2.png Binary files differ diff --git a/src/main/resources/abilityClass9K/C3.png b/src/main/resources/abilityClass9K/C3.png new file mode 100644 index 0000000..323add2 --- /dev/null +++ b/src/main/resources/abilityClass9K/C3.png Binary files differ diff --git a/src/main/resources/abilityClass9K/C4.png b/src/main/resources/abilityClass9K/C4.png new file mode 100644 index 0000000..4a8245a --- /dev/null +++ b/src/main/resources/abilityClass9K/C4.png Binary files differ diff --git a/src/main/resources/abilityClass9K/C5.png b/src/main/resources/abilityClass9K/C5.png new file mode 100644 index 0000000..5aad659 --- /dev/null +++ b/src/main/resources/abilityClass9K/C5.png Binary files differ diff --git a/src/main/resources/abilityClass9K/D1.png b/src/main/resources/abilityClass9K/D1.png new file mode 100644 index 0000000..8fa896f --- /dev/null +++ b/src/main/resources/abilityClass9K/D1.png Binary files differ diff --git a/src/main/resources/abilityClass9K/D2.png b/src/main/resources/abilityClass9K/D2.png new file mode 100644 index 0000000..700fc89 --- /dev/null +++ b/src/main/resources/abilityClass9K/D2.png Binary files differ diff --git a/src/main/resources/abilityClass9K/D3.png b/src/main/resources/abilityClass9K/D3.png new file mode 100644 index 0000000..679389b --- /dev/null +++ b/src/main/resources/abilityClass9K/D3.png Binary files differ diff --git a/src/main/resources/abilityClass9K/D4.png b/src/main/resources/abilityClass9K/D4.png new file mode 100644 index 0000000..5667c97 --- /dev/null +++ b/src/main/resources/abilityClass9K/D4.png Binary files differ diff --git a/src/main/resources/abilityClass9K/D5.png b/src/main/resources/abilityClass9K/D5.png new file mode 100644 index 0000000..de04181 --- /dev/null +++ b/src/main/resources/abilityClass9K/D5.png Binary files differ diff --git a/src/main/resources/abilityClass9K/F.png b/src/main/resources/abilityClass9K/F.png new file mode 100644 index 0000000..7ac5a3e --- /dev/null +++ b/src/main/resources/abilityClass9K/F.png Binary files differ diff --git a/src/main/resources/abilityClass9K/S+.png b/src/main/resources/abilityClass9K/S+.png new file mode 100644 index 0000000..0bc224f --- /dev/null +++ b/src/main/resources/abilityClass9K/S+.png Binary files differ diff --git a/src/main/resources/abilityClass9K/S.png b/src/main/resources/abilityClass9K/S.png new file mode 100644 index 0000000..844d0c2 --- /dev/null +++ b/src/main/resources/abilityClass9K/S.png Binary files differ diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml new file mode 100644 index 0000000..069f697 --- /dev/null +++ b/src/main/resources/log4j2.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/test/kotlin/net/taehui/twilight/UtilityTest.kt b/src/test/kotlin/net/taehui/twilight/UtilityTest.kt new file mode 100644 index 0000000..232ba8f --- /dev/null +++ b/src/test/kotlin/net/taehui/twilight/UtilityTest.kt @@ -0,0 +1,28 @@ +package net.taehui.twilight + +import kotlin.test.Test +import kotlin.test.assertEquals +import kotlin.test.assertFalse +import kotlin.test.assertTrue + +class UtilityTest { + @Test + fun isEtcAsBundle() { + assertFalse(Utility.isEtcNetBundle("")) + assertFalse(Utility.isEtcNetBundle("Qwilight")) + assertFalse(Utility.isEtcNetBundle("MD5")) + assertFalse(Utility.isEtcNetBundle(":0")) + } + + @Test + fun getDefaultAvatarID() { + assertEquals(Utility.getDefaultAvatarID("taehui"), "taehui") + assertEquals(Utility.getDefaultAvatarID("@taehui"), "taehui") + } + + @Test + fun isValidWww() { + assertTrue(Utility.isValidWww("https://taehui.ddns.net/qwilight")) + assertFalse(Utility.isValidWww("/qwilight")) + } +} \ No newline at end of file