From 9b550dd5f90ff4be02d5bb89faa3c3fddd82d128 Mon Sep 17 00:00:00 2001 From: Fabian Richter Date: Wed, 16 Oct 2024 17:04:53 +0200 Subject: [PATCH] fix: revert protoc to v3, update generated files --- .../grpc/SynthesizeServerGrpc.java | 57 +- .../org/languagetool/grpc/Synthesizer.java | 874 ++-- .../languagemodel/bert/grpc/BertLmGrpc.java | 73 +- .../languagemodel/bert/grpc/BertLmProto.java | 1077 ++-- .../languagetool/rules/ml/MLServerGrpc.java | 73 +- .../languagetool/rules/ml/MLServerProto.java | 4579 ++++++++--------- .../rules/ml/PostProcessingServerGrpc.java | 60 +- .../rules/ml/ProcessingServerGrpc.java | 73 +- pom.xml | 2 +- 9 files changed, 3295 insertions(+), 3573 deletions(-) diff --git a/languagetool-core/src/main/java/org/languagetool/grpc/SynthesizeServerGrpc.java b/languagetool-core/src/main/java/org/languagetool/grpc/SynthesizeServerGrpc.java index 325d42b591e7..5537d2bba563 100644 --- a/languagetool-core/src/main/java/org/languagetool/grpc/SynthesizeServerGrpc.java +++ b/languagetool-core/src/main/java/org/languagetool/grpc/SynthesizeServerGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", + value = "by gRPC proto compiler (version 1.68.0)", comments = "Source: synthesizer.proto") @io.grpc.stub.annotations.GrpcGenerated public final class SynthesizeServerGrpc { private SynthesizeServerGrpc() {} - public static final String SERVICE_NAME = "lt_ml_server.SynthesizeServer"; + public static final java.lang.String SERVICE_NAME = "lt_ml_server.SynthesizeServer"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSynthesizeMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service SynthesizeServer. + */ + public static abstract class SynthesizeServerImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getSynthesizeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - org.languagetool.grpc.Synthesizer.SynthesizeRequest, - org.languagetool.grpc.Synthesizer.SynthesizeResponse>( - this, METHODID_SYNTHESIZE))) - .build(); + return SynthesizeServerGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service SynthesizeServer. */ - public static final class SynthesizeServerStub extends io.grpc.stub.AbstractAsyncStub { + public static final class SynthesizeServerStub + extends io.grpc.stub.AbstractAsyncStub { private SynthesizeServerStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -138,8 +139,10 @@ public void synthesize(org.languagetool.grpc.Synthesizer.SynthesizeRequest reque } /** + * A stub to allow clients to do synchronous rpc calls to service SynthesizeServer. */ - public static final class SynthesizeServerBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class SynthesizeServerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private SynthesizeServerBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -160,8 +163,10 @@ public org.languagetool.grpc.Synthesizer.SynthesizeResponse synthesize(org.langu } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service SynthesizeServer. */ - public static final class SynthesizeServerFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class SynthesizeServerFutureStub + extends io.grpc.stub.AbstractFutureStub { private SynthesizeServerFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -189,10 +194,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final SynthesizeServerImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(SynthesizeServerImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -221,6 +226,18 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getSynthesizeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.languagetool.grpc.Synthesizer.SynthesizeRequest, + org.languagetool.grpc.Synthesizer.SynthesizeResponse>( + service, METHODID_SYNTHESIZE))) + .build(); + } + private static abstract class SynthesizeServerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { SynthesizeServerBaseDescriptorSupplier() {} @@ -244,9 +261,9 @@ private static final class SynthesizeServerFileDescriptorSupplier private static final class SynthesizeServerMethodDescriptorSupplier extends SynthesizeServerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - SynthesizeServerMethodDescriptorSupplier(String methodName) { + SynthesizeServerMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/languagetool-core/src/main/java/org/languagetool/grpc/Synthesizer.java b/languagetool-core/src/main/java/org/languagetool/grpc/Synthesizer.java index de58d8e8ca9a..1df11b8f4f44 100644 --- a/languagetool-core/src/main/java/org/languagetool/grpc/Synthesizer.java +++ b/languagetool-core/src/main/java/org/languagetool/grpc/Synthesizer.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: synthesizer.proto +// Protobuf Java Version: 3.25.5 package org.languagetool.grpc; public final class Synthesizer { @@ -78,67 +79,6 @@ protected java.lang.Object newInstance( return new SynthesizeRequest(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SynthesizeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - items_.add( - input.readMessage(org.languagetool.grpc.Synthesizer.SynthesizeRequestItem.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.grpc.Synthesizer.internal_static_lt_ml_server_SynthesizeRequest_descriptor; @@ -153,7 +93,8 @@ private SynthesizeRequest( } public static final int LANGUAGECODE_FIELD_NUMBER = 1; - private volatile java.lang.Object languageCode_; + @SuppressWarnings("serial") + private volatile java.lang.Object languageCode_ = ""; /** * string languageCode = 1; * @return The languageCode. @@ -191,6 +132,7 @@ public java.lang.String getLanguageCode() { } public static final int ITEMS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List items_; /** * repeated .lt_ml_server.SynthesizeRequestItem items = 2; @@ -244,13 +186,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, languageCode_); } for (int i = 0; i < items_.size(); i++) { output.writeMessage(2, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -259,14 +201,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getLanguageCodeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, languageCode_); } for (int i = 0; i < items_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -285,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getLanguageCode())) return false; if (!getItemsList() .equals(other.getItemsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -302,7 +244,7 @@ public int hashCode() { hash = (37 * hash) + ITEMS_FIELD_NUMBER; hash = (53 * hash) + getItemsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -351,11 +293,13 @@ public static org.languagetool.grpc.Synthesizer.SynthesizeRequest parseFrom( return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.grpc.Synthesizer.SynthesizeRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.grpc.Synthesizer.SynthesizeRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -419,31 +363,26 @@ public static final class Builder extends // Construct using org.languagetool.grpc.Synthesizer.SynthesizeRequest.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getItemsFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; languageCode_ = ""; - if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -470,19 +409,29 @@ public org.languagetool.grpc.Synthesizer.SynthesizeRequest build() { @java.lang.Override public org.languagetool.grpc.Synthesizer.SynthesizeRequest buildPartial() { org.languagetool.grpc.Synthesizer.SynthesizeRequest result = new org.languagetool.grpc.Synthesizer.SynthesizeRequest(this); - int from_bitField0_ = bitField0_; - result.languageCode_ = languageCode_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.grpc.Synthesizer.SynthesizeRequest result) { if (itemsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { items_ = java.util.Collections.unmodifiableList(items_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } result.items_ = items_; } else { result.items_ = itemsBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(org.languagetool.grpc.Synthesizer.SynthesizeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.languageCode_ = languageCode_; + } } @java.lang.Override @@ -531,13 +480,14 @@ public Builder mergeFrom(org.languagetool.grpc.Synthesizer.SynthesizeRequest oth if (other == org.languagetool.grpc.Synthesizer.SynthesizeRequest.getDefaultInstance()) return this; if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; + bitField0_ |= 0x00000001; onChanged(); } if (itemsBuilder_ == null) { if (!other.items_.isEmpty()) { if (items_.isEmpty()) { items_ = other.items_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureItemsIsMutable(); items_.addAll(other.items_); @@ -550,7 +500,7 @@ public Builder mergeFrom(org.languagetool.grpc.Synthesizer.SynthesizeRequest oth itemsBuilder_.dispose(); itemsBuilder_ = null; items_ = other.items_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); itemsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getItemsFieldBuilder() : null; @@ -559,7 +509,7 @@ public Builder mergeFrom(org.languagetool.grpc.Synthesizer.SynthesizeRequest oth } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -574,17 +524,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.grpc.Synthesizer.SynthesizeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + languageCode_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + org.languagetool.grpc.Synthesizer.SynthesizeRequestItem m = + input.readMessage( + org.languagetool.grpc.Synthesizer.SynthesizeRequestItem.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.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) { - parsedMessage = (org.languagetool.grpc.Synthesizer.SynthesizeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -630,11 +611,9 @@ public java.lang.String getLanguageCode() { */ public Builder setLanguageCode( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } languageCode_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -643,8 +622,8 @@ public Builder setLanguageCode( * @return This builder for chaining. */ public Builder clearLanguageCode() { - languageCode_ = getDefaultInstance().getLanguageCode(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -655,12 +634,10 @@ public Builder clearLanguageCode() { */ public Builder setLanguageCodeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); languageCode_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -668,9 +645,9 @@ public Builder setLanguageCodeBytes( private java.util.List items_ = java.util.Collections.emptyList(); private void ensureItemsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { items_ = new java.util.ArrayList(items_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } @@ -820,7 +797,7 @@ public Builder addAllItems( public Builder clearItems() { if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { itemsBuilder_.clear(); @@ -897,7 +874,7 @@ public org.languagetool.grpc.Synthesizer.SynthesizeRequestItem.Builder addItemsB itemsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< org.languagetool.grpc.Synthesizer.SynthesizeRequestItem, org.languagetool.grpc.Synthesizer.SynthesizeRequestItem.Builder, org.languagetool.grpc.Synthesizer.SynthesizeRequestItemOrBuilder>( items_, - ((bitField0_ & 0x00000001) != 0), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); items_ = null; @@ -937,7 +914,18 @@ public SynthesizeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SynthesizeRequest(input, extensionRegistry); + 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(); } }; @@ -1043,84 +1031,6 @@ protected java.lang.Object newInstance( return new SynthesizeRequestItem(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SynthesizeRequestItem( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.Builder subBuilder = null; - if (tokens_ != null) { - subBuilder = tokens_.toBuilder(); - } - tokens_ = input.readMessage(org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(tokens_); - tokens_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - postag_ = s; - break; - } - case 24: { - - postagRegexp_ = input.readBool(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - postagReplace_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - lemma_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.grpc.Synthesizer.internal_static_lt_ml_server_SynthesizeRequestItem_descriptor; @@ -1134,6 +1044,7 @@ private SynthesizeRequestItem( org.languagetool.grpc.Synthesizer.SynthesizeRequestItem.class, org.languagetool.grpc.Synthesizer.SynthesizeRequestItem.Builder.class); } + private int bitField0_; public static final int TOKENS_FIELD_NUMBER = 1; private org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings tokens_; /** @@ -1142,7 +1053,7 @@ private SynthesizeRequestItem( */ @java.lang.Override public boolean hasTokens() { - return tokens_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * .lt_ml_server.AnalyzedTokenReadings tokens = 1; @@ -1157,11 +1068,12 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings getTokens() */ @java.lang.Override public org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadingsOrBuilder getTokensOrBuilder() { - return getTokens(); + return tokens_ == null ? org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.getDefaultInstance() : tokens_; } public static final int POSTAG_FIELD_NUMBER = 2; - private volatile java.lang.Object postag_; + @SuppressWarnings("serial") + private volatile java.lang.Object postag_ = ""; /** * string postag = 2; * @return The postag. @@ -1199,7 +1111,7 @@ public java.lang.String getPostag() { } public static final int POSTAG_REGEXP_FIELD_NUMBER = 3; - private boolean postagRegexp_; + private boolean postagRegexp_ = false; /** * bool postag_regexp = 3; * @return The postagRegexp. @@ -1210,7 +1122,8 @@ public boolean getPostagRegexp() { } public static final int POSTAG_REPLACE_FIELD_NUMBER = 4; - private volatile java.lang.Object postagReplace_; + @SuppressWarnings("serial") + private volatile java.lang.Object postagReplace_ = ""; /** * string postag_replace = 4; * @return The postagReplace. @@ -1248,7 +1161,8 @@ public java.lang.String getPostagReplace() { } public static final int LEMMA_FIELD_NUMBER = 5; - private volatile java.lang.Object lemma_; + @SuppressWarnings("serial") + private volatile java.lang.Object lemma_ = ""; /** * string lemma = 5; * @return The lemma. @@ -1299,22 +1213,22 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (tokens_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getTokens()); } - if (!getPostagBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, postag_); } if (postagRegexp_ != false) { output.writeBool(3, postagRegexp_); } - if (!getPostagReplaceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postagReplace_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, postagReplace_); } - if (!getLemmaBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lemma_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, lemma_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1323,24 +1237,24 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (tokens_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getTokens()); } - if (!getPostagBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, postag_); } if (postagRegexp_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, postagRegexp_); } - if (!getPostagReplaceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(postagReplace_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, postagReplace_); } - if (!getLemmaBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lemma_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, lemma_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1368,7 +1282,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getPostagReplace())) return false; if (!getLemma() .equals(other.getLemma())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1392,7 +1306,7 @@ public int hashCode() { hash = (53 * hash) + getPostagReplace().hashCode(); hash = (37 * hash) + LEMMA_FIELD_NUMBER; hash = (53 * hash) + getLemma().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1441,11 +1355,13 @@ public static org.languagetool.grpc.Synthesizer.SynthesizeRequestItem parseFrom( return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.grpc.Synthesizer.SynthesizeRequestItem parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.grpc.Synthesizer.SynthesizeRequestItem parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1520,25 +1436,22 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { + getTokensFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); - if (tokensBuilder_ == null) { - tokens_ = null; - } else { - tokens_ = null; + bitField0_ = 0; + tokens_ = null; + if (tokensBuilder_ != null) { + tokensBuilder_.dispose(); tokensBuilder_ = null; } postag_ = ""; - postagRegexp_ = false; - postagReplace_ = ""; - lemma_ = ""; - return this; } @@ -1565,19 +1478,35 @@ public org.languagetool.grpc.Synthesizer.SynthesizeRequestItem build() { @java.lang.Override public org.languagetool.grpc.Synthesizer.SynthesizeRequestItem buildPartial() { org.languagetool.grpc.Synthesizer.SynthesizeRequestItem result = new org.languagetool.grpc.Synthesizer.SynthesizeRequestItem(this); - if (tokensBuilder_ == null) { - result.tokens_ = tokens_; - } else { - result.tokens_ = tokensBuilder_.build(); - } - result.postag_ = postag_; - result.postagRegexp_ = postagRegexp_; - result.postagReplace_ = postagReplace_; - result.lemma_ = lemma_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(org.languagetool.grpc.Synthesizer.SynthesizeRequestItem result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.tokens_ = tokensBuilder_ == null + ? tokens_ + : tokensBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.postag_ = postag_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.postagRegexp_ = postagRegexp_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.postagReplace_ = postagReplace_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.lemma_ = lemma_; + } + result.bitField0_ |= to_bitField0_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -1627,6 +1556,7 @@ public Builder mergeFrom(org.languagetool.grpc.Synthesizer.SynthesizeRequestItem } if (!other.getPostag().isEmpty()) { postag_ = other.postag_; + bitField0_ |= 0x00000002; onChanged(); } if (other.getPostagRegexp() != false) { @@ -1634,13 +1564,15 @@ public Builder mergeFrom(org.languagetool.grpc.Synthesizer.SynthesizeRequestItem } if (!other.getPostagReplace().isEmpty()) { postagReplace_ = other.postagReplace_; + bitField0_ |= 0x00000008; onChanged(); } if (!other.getLemma().isEmpty()) { lemma_ = other.lemma_; + bitField0_ |= 0x00000010; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1655,19 +1587,60 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.grpc.Synthesizer.SynthesizeRequestItem parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getTokensFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + postag_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 24: { + postagRegexp_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 34: { + postagReplace_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + lemma_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.grpc.Synthesizer.SynthesizeRequestItem) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings tokens_; private com.google.protobuf.SingleFieldBuilderV3< @@ -1677,7 +1650,7 @@ public Builder mergeFrom( * @return Whether the tokens field is set. */ public boolean hasTokens() { - return tokensBuilder_ != null || tokens_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * .lt_ml_server.AnalyzedTokenReadings tokens = 1; @@ -1699,11 +1672,11 @@ public Builder setTokens(org.languagetool.rules.ml.MLServerProto.AnalyzedTokenRe throw new NullPointerException(); } tokens_ = value; - onChanged(); } else { tokensBuilder_.setMessage(value); } - + bitField0_ |= 0x00000001; + onChanged(); return this; } /** @@ -1713,11 +1686,11 @@ public Builder setTokens( org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.Builder builderForValue) { if (tokensBuilder_ == null) { tokens_ = builderForValue.build(); - onChanged(); } else { tokensBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000001; + onChanged(); return this; } /** @@ -1725,38 +1698,40 @@ public Builder setTokens( */ public Builder mergeTokens(org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings value) { if (tokensBuilder_ == null) { - if (tokens_ != null) { - tokens_ = - org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.newBuilder(tokens_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000001) != 0) && + tokens_ != null && + tokens_ != org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.getDefaultInstance()) { + getTokensBuilder().mergeFrom(value); } else { tokens_ = value; } - onChanged(); } else { tokensBuilder_.mergeFrom(value); } - + if (tokens_ != null) { + bitField0_ |= 0x00000001; + onChanged(); + } return this; } /** * .lt_ml_server.AnalyzedTokenReadings tokens = 1; */ public Builder clearTokens() { - if (tokensBuilder_ == null) { - tokens_ = null; - onChanged(); - } else { - tokens_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + tokens_ = null; + if (tokensBuilder_ != null) { + tokensBuilder_.dispose(); tokensBuilder_ = null; } - + onChanged(); return this; } /** * .lt_ml_server.AnalyzedTokenReadings tokens = 1; */ public org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.Builder getTokensBuilder() { - + bitField0_ |= 0x00000001; onChanged(); return getTokensFieldBuilder().getBuilder(); } @@ -1829,11 +1804,9 @@ public java.lang.String getPostag() { */ public Builder setPostag( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } postag_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1842,8 +1815,8 @@ public Builder setPostag( * @return This builder for chaining. */ public Builder clearPostag() { - postag_ = getDefaultInstance().getPostag(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -1854,12 +1827,10 @@ public Builder clearPostag() { */ public Builder setPostagBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); postag_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1879,8 +1850,9 @@ public boolean getPostagRegexp() { * @return This builder for chaining. */ public Builder setPostagRegexp(boolean value) { - + postagRegexp_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1889,7 +1861,7 @@ public Builder setPostagRegexp(boolean value) { * @return This builder for chaining. */ public Builder clearPostagRegexp() { - + bitField0_ = (bitField0_ & ~0x00000004); postagRegexp_ = false; onChanged(); return this; @@ -1936,11 +1908,9 @@ public java.lang.String getPostagReplace() { */ public Builder setPostagReplace( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } postagReplace_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1949,8 +1919,8 @@ public Builder setPostagReplace( * @return This builder for chaining. */ public Builder clearPostagReplace() { - postagReplace_ = getDefaultInstance().getPostagReplace(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -1961,12 +1931,10 @@ public Builder clearPostagReplace() { */ public Builder setPostagReplaceBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); postagReplace_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -2012,11 +1980,9 @@ public java.lang.String getLemma() { */ public Builder setLemma( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } lemma_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2025,8 +1991,8 @@ public Builder setLemma( * @return This builder for chaining. */ public Builder clearLemma() { - lemma_ = getDefaultInstance().getLemma(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -2037,12 +2003,10 @@ public Builder clearLemma() { */ public Builder setLemmaBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); lemma_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2079,7 +2043,18 @@ public SynthesizeRequestItem parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SynthesizeRequestItem(input, extensionRegistry); + 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(); } }; @@ -2150,61 +2125,6 @@ protected java.lang.Object newInstance( return new SynthesizeResponse(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SynthesizeResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - items_.add( - input.readMessage(org.languagetool.grpc.Synthesizer.SynthesizeResponseItem.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - items_ = java.util.Collections.unmodifiableList(items_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.grpc.Synthesizer.internal_static_lt_ml_server_SynthesizeResponse_descriptor; @@ -2219,6 +2139,7 @@ private SynthesizeResponse( } public static final int ITEMS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List items_; /** * repeated .lt_ml_server.SynthesizeResponseItem items = 1; @@ -2275,7 +2196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < items_.size(); i++) { output.writeMessage(1, items_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2288,7 +2209,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, items_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2305,7 +2226,7 @@ public boolean equals(final java.lang.Object obj) { if (!getItemsList() .equals(other.getItemsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2320,7 +2241,7 @@ public int hashCode() { hash = (37 * hash) + ITEMS_FIELD_NUMBER; hash = (53 * hash) + getItemsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2369,11 +2290,13 @@ public static org.languagetool.grpc.Synthesizer.SynthesizeResponse parseFrom( return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.grpc.Synthesizer.SynthesizeResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.grpc.Synthesizer.SynthesizeResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2437,29 +2360,25 @@ public static final class Builder extends // Construct using org.languagetool.grpc.Synthesizer.SynthesizeResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getItemsFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (itemsBuilder_ == null) { items_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + items_ = null; itemsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2486,7 +2405,13 @@ public org.languagetool.grpc.Synthesizer.SynthesizeResponse build() { @java.lang.Override public org.languagetool.grpc.Synthesizer.SynthesizeResponse buildPartial() { org.languagetool.grpc.Synthesizer.SynthesizeResponse result = new org.languagetool.grpc.Synthesizer.SynthesizeResponse(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.grpc.Synthesizer.SynthesizeResponse result) { if (itemsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { items_ = java.util.Collections.unmodifiableList(items_); @@ -2496,8 +2421,10 @@ public org.languagetool.grpc.Synthesizer.SynthesizeResponse buildPartial() { } else { result.items_ = itemsBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(org.languagetool.grpc.Synthesizer.SynthesizeResponse result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -2570,7 +2497,7 @@ public Builder mergeFrom(org.languagetool.grpc.Synthesizer.SynthesizeResponse ot } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2585,17 +2512,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.grpc.Synthesizer.SynthesizeResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.languagetool.grpc.Synthesizer.SynthesizeResponseItem m = + input.readMessage( + org.languagetool.grpc.Synthesizer.SynthesizeResponseItem.parser(), + extensionRegistry); + if (itemsBuilder_ == null) { + ensureItemsIsMutable(); + items_.add(m); + } else { + itemsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.grpc.Synthesizer.SynthesizeResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -2872,7 +2825,18 @@ public SynthesizeResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SynthesizeResponse(input, extensionRegistry); + 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(); } }; @@ -2934,7 +2898,8 @@ private SynthesizeResponseItem(com.google.protobuf.GeneratedMessageV3.Builder super(builder); } private SynthesizeResponseItem() { - forms_ = com.google.protobuf.LazyStringArrayList.EMPTY; + forms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -2944,61 +2909,6 @@ protected java.lang.Object newInstance( return new SynthesizeResponseItem(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SynthesizeResponseItem( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - forms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - forms_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - forms_ = forms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.grpc.Synthesizer.internal_static_lt_ml_server_SynthesizeResponseItem_descriptor; @@ -3013,7 +2923,9 @@ private SynthesizeResponseItem( } public static final int FORMS_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList forms_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList forms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * repeated string forms = 1; * @return A list containing the forms. @@ -3064,7 +2976,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < forms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, forms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3081,7 +2993,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getFormsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3098,7 +3010,7 @@ public boolean equals(final java.lang.Object obj) { if (!getFormsList() .equals(other.getFormsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3113,7 +3025,7 @@ public int hashCode() { hash = (37 * hash) + FORMS_FIELD_NUMBER; hash = (53 * hash) + getFormsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3162,11 +3074,13 @@ public static org.languagetool.grpc.Synthesizer.SynthesizeResponseItem parseFrom return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.grpc.Synthesizer.SynthesizeResponseItem parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.grpc.Synthesizer.SynthesizeResponseItem parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -3230,24 +3144,20 @@ public static final class Builder extends // Construct using org.languagetool.grpc.Synthesizer.SynthesizeResponseItem.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); - forms_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = 0; + forms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -3274,16 +3184,19 @@ public org.languagetool.grpc.Synthesizer.SynthesizeResponseItem build() { @java.lang.Override public org.languagetool.grpc.Synthesizer.SynthesizeResponseItem buildPartial() { org.languagetool.grpc.Synthesizer.SynthesizeResponseItem result = new org.languagetool.grpc.Synthesizer.SynthesizeResponseItem(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { - forms_ = forms_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.forms_ = forms_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(org.languagetool.grpc.Synthesizer.SynthesizeResponseItem result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + forms_.makeImmutable(); + result.forms_ = forms_; + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -3331,14 +3244,14 @@ public Builder mergeFrom(org.languagetool.grpc.Synthesizer.SynthesizeResponseIte if (!other.forms_.isEmpty()) { if (forms_.isEmpty()) { forms_ = other.forms_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ |= 0x00000001; } else { ensureFormsIsMutable(); forms_.addAll(other.forms_); } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3353,27 +3266,47 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.grpc.Synthesizer.SynthesizeResponseItem parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureFormsIsMutable(); + forms_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.grpc.Synthesizer.SynthesizeResponseItem) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; - private com.google.protobuf.LazyStringList forms_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList forms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureFormsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!forms_.isModifiable()) { forms_ = new com.google.protobuf.LazyStringArrayList(forms_); - bitField0_ |= 0x00000001; - } + } + bitField0_ |= 0x00000001; } /** * repeated string forms = 1; @@ -3381,7 +3314,8 @@ private void ensureFormsIsMutable() { */ public com.google.protobuf.ProtocolStringList getFormsList() { - return forms_.getUnmodifiableView(); + forms_.makeImmutable(); + return forms_; } /** * repeated string forms = 1; @@ -3415,11 +3349,10 @@ public java.lang.String getForms(int index) { */ public Builder setForms( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFormsIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureFormsIsMutable(); forms_.set(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3430,11 +3363,10 @@ public Builder setForms( */ public Builder addForms( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureFormsIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureFormsIsMutable(); forms_.add(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3448,6 +3380,7 @@ public Builder addAllForms( ensureFormsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, forms_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3456,8 +3389,9 @@ public Builder addAllForms( * @return This builder for chaining. */ public Builder clearForms() { - forms_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + forms_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001);; onChanged(); return this; } @@ -3468,12 +3402,11 @@ public Builder clearForms() { */ public Builder addFormsBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureFormsIsMutable(); forms_.add(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -3510,7 +3443,18 @@ public SynthesizeResponseItem parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SynthesizeResponseItem(input, extensionRegistry); + 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(); } }; diff --git a/languagetool-core/src/main/java/org/languagetool/languagemodel/bert/grpc/BertLmGrpc.java b/languagetool-core/src/main/java/org/languagetool/languagemodel/bert/grpc/BertLmGrpc.java index ba0a093e39fe..a489c1f0e03c 100644 --- a/languagetool-core/src/main/java/org/languagetool/languagemodel/bert/grpc/BertLmGrpc.java +++ b/languagetool-core/src/main/java/org/languagetool/languagemodel/bert/grpc/BertLmGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", + value = "by gRPC proto compiler (version 1.68.0)", comments = "Source: bert-lm.proto") @io.grpc.stub.annotations.GrpcGenerated public final class BertLmGrpc { private BertLmGrpc() {} - public static final String SERVICE_NAME = "bert.BertLm"; + public static final java.lang.String SERVICE_NAME = "bert.BertLm"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getScoreMethod(), responseObserver); } /** */ - public void batchScore(org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest request, + default void batchScore(org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getBatchScoreMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service BertLm. + */ + public static abstract class BertLmImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getScoreMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest, - org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse>( - this, METHODID_SCORE))) - .addMethod( - getBatchScoreMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest, - org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse>( - this, METHODID_BATCH_SCORE))) - .build(); + return BertLmGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service BertLm. */ - public static final class BertLmStub extends io.grpc.stub.AbstractAsyncStub { + public static final class BertLmStub + extends io.grpc.stub.AbstractAsyncStub { private BertLmStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -191,8 +185,10 @@ public void batchScore(org.languagetool.languagemodel.bert.grpc.BertLmProto.Batc } /** + * A stub to allow clients to do synchronous rpc calls to service BertLm. */ - public static final class BertLmBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class BertLmBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private BertLmBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -220,8 +216,10 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service BertLm. */ - public static final class BertLmFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class BertLmFutureStub + extends io.grpc.stub.AbstractFutureStub { private BertLmFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -258,10 +256,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final BertLmImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(BertLmImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -294,6 +292,25 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getScoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest, + org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse>( + service, METHODID_SCORE))) + .addMethod( + getBatchScoreMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest, + org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse>( + service, METHODID_BATCH_SCORE))) + .build(); + } + private static abstract class BertLmBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { BertLmBaseDescriptorSupplier() {} @@ -317,9 +334,9 @@ private static final class BertLmFileDescriptorSupplier private static final class BertLmMethodDescriptorSupplier extends BertLmBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - BertLmMethodDescriptorSupplier(String methodName) { + BertLmMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/languagetool-core/src/main/java/org/languagetool/languagemodel/bert/grpc/BertLmProto.java b/languagetool-core/src/main/java/org/languagetool/languagemodel/bert/grpc/BertLmProto.java index 852b89f4400b..a3a160e8079a 100644 --- a/languagetool-core/src/main/java/org/languagetool/languagemodel/bert/grpc/BertLmProto.java +++ b/languagetool-core/src/main/java/org/languagetool/languagemodel/bert/grpc/BertLmProto.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: bert-lm.proto +// Protobuf Java Version: 3.25.5 package org.languagetool.languagemodel.bert.grpc; public final class BertLmProto { @@ -68,7 +69,8 @@ private Mask(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Mask() { - candidates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + candidates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -78,71 +80,6 @@ protected java.lang.Object newInstance( return new Mask(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Mask( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - start_ = input.readUInt32(); - break; - } - case 16: { - - end_ = input.readUInt32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - candidates_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - candidates_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - candidates_ = candidates_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.languagemodel.bert.grpc.BertLmProto.internal_static_bert_Mask_descriptor; @@ -157,7 +94,7 @@ private Mask( } public static final int START_FIELD_NUMBER = 1; - private int start_; + private int start_ = 0; /** * uint32 start = 1; * @return The start. @@ -168,7 +105,7 @@ public int getStart() { } public static final int END_FIELD_NUMBER = 2; - private int end_; + private int end_ = 0; /** * uint32 end = 2; * @return The end. @@ -179,7 +116,9 @@ public int getEnd() { } public static final int CANDIDATES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList candidates_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList candidates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * repeated string candidates = 3; * @return A list containing the candidates. @@ -236,7 +175,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < candidates_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, candidates_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -261,7 +200,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getCandidatesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -282,7 +221,7 @@ public boolean equals(final java.lang.Object obj) { != other.getEnd()) return false; if (!getCandidatesList() .equals(other.getCandidatesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -301,7 +240,7 @@ public int hashCode() { hash = (37 * hash) + CANDIDATES_FIELD_NUMBER; hash = (53 * hash) + getCandidatesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -350,11 +289,13 @@ public static org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask parseFro return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -418,28 +359,22 @@ public static final class Builder extends // Construct using org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; start_ = 0; - end_ = 0; - - candidates_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + candidates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -466,18 +401,25 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask build() { @java.lang.Override public org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask buildPartial() { org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask result = new org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask(this); - int from_bitField0_ = bitField0_; - result.start_ = start_; - result.end_ = end_; - if (((bitField0_ & 0x00000001) != 0)) { - candidates_ = candidates_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.candidates_ = candidates_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.start_ = start_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.end_ = end_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + candidates_.makeImmutable(); + result.candidates_ = candidates_; + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -531,14 +473,14 @@ public Builder mergeFrom(org.languagetool.languagemodel.bert.grpc.BertLmProto.Ma if (!other.candidates_.isEmpty()) { if (candidates_.isEmpty()) { candidates_ = other.candidates_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ |= 0x00000004; } else { ensureCandidatesIsMutable(); candidates_.addAll(other.candidates_); } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -553,17 +495,46 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + start_ = input.readUInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + end_ = input.readUInt32(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureCandidatesIsMutable(); + candidates_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -583,8 +554,9 @@ public int getStart() { * @return This builder for chaining. */ public Builder setStart(int value) { - + start_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -593,7 +565,7 @@ public Builder setStart(int value) { * @return This builder for chaining. */ public Builder clearStart() { - + bitField0_ = (bitField0_ & ~0x00000001); start_ = 0; onChanged(); return this; @@ -614,8 +586,9 @@ public int getEnd() { * @return This builder for chaining. */ public Builder setEnd(int value) { - + end_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -624,18 +597,19 @@ public Builder setEnd(int value) { * @return This builder for chaining. */ public Builder clearEnd() { - + bitField0_ = (bitField0_ & ~0x00000002); end_ = 0; onChanged(); return this; } - private com.google.protobuf.LazyStringList candidates_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList candidates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureCandidatesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!candidates_.isModifiable()) { candidates_ = new com.google.protobuf.LazyStringArrayList(candidates_); - bitField0_ |= 0x00000001; - } + } + bitField0_ |= 0x00000004; } /** * repeated string candidates = 3; @@ -643,7 +617,8 @@ private void ensureCandidatesIsMutable() { */ public com.google.protobuf.ProtocolStringList getCandidatesList() { - return candidates_.getUnmodifiableView(); + candidates_.makeImmutable(); + return candidates_; } /** * repeated string candidates = 3; @@ -677,11 +652,10 @@ public java.lang.String getCandidates(int index) { */ public Builder setCandidates( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureCandidatesIsMutable(); candidates_.set(index, value); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -692,11 +666,10 @@ public Builder setCandidates( */ public Builder addCandidates( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureCandidatesIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureCandidatesIsMutable(); candidates_.add(value); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -710,6 +683,7 @@ public Builder addAllCandidates( ensureCandidatesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, candidates_); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -718,8 +692,9 @@ public Builder addAllCandidates( * @return This builder for chaining. */ public Builder clearCandidates() { - candidates_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + candidates_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004);; onChanged(); return this; } @@ -730,12 +705,11 @@ public Builder clearCandidates() { */ public Builder addCandidatesBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureCandidatesIsMutable(); candidates_.add(value); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -772,7 +746,18 @@ public Mask parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Mask(input, extensionRegistry); + 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(); } }; @@ -856,67 +841,6 @@ protected java.lang.Object newInstance( return new ScoreRequest(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ScoreRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - mask_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - mask_.add( - input.readMessage(org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - mask_ = java.util.Collections.unmodifiableList(mask_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.languagemodel.bert.grpc.BertLmProto.internal_static_bert_ScoreRequest_descriptor; @@ -931,7 +855,8 @@ private ScoreRequest( } public static final int TEXT_FIELD_NUMBER = 1; - private volatile java.lang.Object text_; + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; /** * string text = 1; * @return The text. @@ -969,6 +894,7 @@ public java.lang.String getText() { } public static final int MASK_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List mask_; /** * repeated .bert.Mask mask = 2; @@ -1022,13 +948,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); } for (int i = 0; i < mask_.size(); i++) { output.writeMessage(2, mask_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1037,14 +963,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); } for (int i = 0; i < mask_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, mask_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1063,7 +989,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getText())) return false; if (!getMaskList() .equals(other.getMaskList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1080,7 +1006,7 @@ public int hashCode() { hash = (37 * hash) + MASK_FIELD_NUMBER; hash = (53 * hash) + getMaskList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1129,11 +1055,13 @@ public static org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1197,31 +1125,26 @@ public static final class Builder extends // Construct using org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMaskFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; text_ = ""; - if (maskBuilder_ == null) { mask_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + mask_ = null; maskBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1248,19 +1171,29 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest build() @java.lang.Override public org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest buildPartial() { org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest result = new org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest(this); - int from_bitField0_ = bitField0_; - result.text_ = text_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest result) { if (maskBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { + if (((bitField0_ & 0x00000002) != 0)) { mask_ = java.util.Collections.unmodifiableList(mask_); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } result.mask_ = mask_; } else { result.mask_ = maskBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } } @java.lang.Override @@ -1309,13 +1242,14 @@ public Builder mergeFrom(org.languagetool.languagemodel.bert.grpc.BertLmProto.Sc if (other == org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest.getDefaultInstance()) return this; if (!other.getText().isEmpty()) { text_ = other.text_; + bitField0_ |= 0x00000001; onChanged(); } if (maskBuilder_ == null) { if (!other.mask_.isEmpty()) { if (mask_.isEmpty()) { mask_ = other.mask_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); } else { ensureMaskIsMutable(); mask_.addAll(other.mask_); @@ -1328,7 +1262,7 @@ public Builder mergeFrom(org.languagetool.languagemodel.bert.grpc.BertLmProto.Sc maskBuilder_.dispose(); maskBuilder_ = null; mask_ = other.mask_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); maskBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getMaskFieldBuilder() : null; @@ -1337,7 +1271,7 @@ public Builder mergeFrom(org.languagetool.languagemodel.bert.grpc.BertLmProto.Sc } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1352,17 +1286,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask m = + input.readMessage( + org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask.parser(), + extensionRegistry); + if (maskBuilder_ == null) { + ensureMaskIsMutable(); + mask_.add(m); + } else { + maskBuilder_.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) { - parsedMessage = (org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -1408,11 +1373,9 @@ public java.lang.String getText() { */ public Builder setText( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } text_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1421,8 +1384,8 @@ public Builder setText( * @return This builder for chaining. */ public Builder clearText() { - text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -1433,12 +1396,10 @@ public Builder clearText() { */ public Builder setTextBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); text_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1446,9 +1407,9 @@ public Builder setTextBytes( private java.util.List mask_ = java.util.Collections.emptyList(); private void ensureMaskIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!((bitField0_ & 0x00000002) != 0)) { mask_ = new java.util.ArrayList(mask_); - bitField0_ |= 0x00000001; + bitField0_ |= 0x00000002; } } @@ -1598,7 +1559,7 @@ public Builder addAllMask( public Builder clearMask() { if (maskBuilder_ == null) { mask_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { maskBuilder_.clear(); @@ -1675,7 +1636,7 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask.Builder addMask maskBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask, org.languagetool.languagemodel.bert.grpc.BertLmProto.Mask.Builder, org.languagetool.languagemodel.bert.grpc.BertLmProto.MaskOrBuilder>( mask_, - ((bitField0_ & 0x00000001) != 0), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); mask_ = null; @@ -1715,7 +1676,18 @@ public ScoreRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ScoreRequest(input, extensionRegistry); + 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(); } }; @@ -1779,73 +1751,6 @@ protected java.lang.Object newInstance( return new Prediction(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Prediction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - score_ = newDoubleList(); - mutable_bitField0_ |= 0x00000001; - } - score_.addDouble(input.readDouble()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - score_ = newDoubleList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - score_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - score_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.languagemodel.bert.grpc.BertLmProto.internal_static_bert_Prediction_descriptor; @@ -1860,7 +1765,9 @@ private Prediction( } public static final int SCORE_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.DoubleList score_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.DoubleList score_ = + emptyDoubleList(); /** * repeated double score = 1; * @return A list containing the score. @@ -1909,7 +1816,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < score_.size(); i++) { output.writeDoubleNoTag(score_.getDouble(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1929,7 +1836,7 @@ public int getSerializedSize() { } scoreMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1946,7 +1853,7 @@ public boolean equals(final java.lang.Object obj) { if (!getScoreList() .equals(other.getScoreList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1961,7 +1868,7 @@ public int hashCode() { hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + getScoreList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2010,11 +1917,13 @@ public static org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction pa return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2078,24 +1987,19 @@ public static final class Builder extends // Construct using org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; score_ = emptyDoubleList(); - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2122,14 +2026,17 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction build() { @java.lang.Override public org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction buildPartial() { org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction result = new org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction result) { int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) != 0)) { + if (((from_bitField0_ & 0x00000001) != 0)) { score_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); + result.score_ = score_; } - result.score_ = score_; - onBuilt(); - return result; } @java.lang.Override @@ -2179,14 +2086,15 @@ public Builder mergeFrom(org.languagetool.languagemodel.bert.grpc.BertLmProto.Pr if (!other.score_.isEmpty()) { if (score_.isEmpty()) { score_ = other.score_; - bitField0_ = (bitField0_ & ~0x00000001); + score_.makeImmutable(); + bitField0_ |= 0x00000001; } else { ensureScoreIsMutable(); score_.addAll(other.score_); } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2201,27 +2109,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + double v = input.readDouble(); + ensureScoreIsMutable(); + score_.addDouble(v); + break; + } // case 9 + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + int alloc = length > 4096 ? 4096 : length; + ensureScoreIsMutable(alloc / 8); + while (input.getBytesUntilLimit() > 0) { + score_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; private com.google.protobuf.Internal.DoubleList score_ = emptyDoubleList(); private void ensureScoreIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - score_ = mutableCopy(score_); - bitField0_ |= 0x00000001; - } + if (!score_.isModifiable()) { + score_ = makeMutableCopy(score_); + } + bitField0_ |= 0x00000001; + } + private void ensureScoreIsMutable(int capacity) { + if (!score_.isModifiable()) { + score_ = makeMutableCopy(score_, capacity); + } + bitField0_ |= 0x00000001; } /** * repeated double score = 1; @@ -2229,8 +2173,8 @@ private void ensureScoreIsMutable() { */ public java.util.List getScoreList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(score_) : score_; + score_.makeImmutable(); + return score_; } /** * repeated double score = 1; @@ -2255,8 +2199,10 @@ public double getScore(int index) { */ public Builder setScore( int index, double value) { + ensureScoreIsMutable(); score_.setDouble(index, value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2266,8 +2212,10 @@ public Builder setScore( * @return This builder for chaining. */ public Builder addScore(double value) { + ensureScoreIsMutable(); score_.addDouble(value); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2281,6 +2229,7 @@ public Builder addAllScore( ensureScoreIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, score_); + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -2327,7 +2276,18 @@ public Prediction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Prediction(input, extensionRegistry); + 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(); } }; @@ -2398,61 +2358,6 @@ protected java.lang.Object newInstance( return new BertLmResponse(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BertLmResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - scores_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - scores_.add( - input.readMessage(org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - scores_ = java.util.Collections.unmodifiableList(scores_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.languagemodel.bert.grpc.BertLmProto.internal_static_bert_BertLmResponse_descriptor; @@ -2467,6 +2372,7 @@ private BertLmResponse( } public static final int SCORES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List scores_; /** * repeated .bert.Prediction scores = 1; @@ -2523,7 +2429,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < scores_.size(); i++) { output.writeMessage(1, scores_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2536,7 +2442,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, scores_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2553,7 +2459,7 @@ public boolean equals(final java.lang.Object obj) { if (!getScoresList() .equals(other.getScoresList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2568,7 +2474,7 @@ public int hashCode() { hash = (37 * hash) + SCORES_FIELD_NUMBER; hash = (53 * hash) + getScoresList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2617,11 +2523,13 @@ public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmRespons return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2685,29 +2593,25 @@ public static final class Builder extends // Construct using org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getScoresFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (scoresBuilder_ == null) { scores_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + scores_ = null; scoresBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2734,7 +2638,13 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse build @java.lang.Override public org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse buildPartial() { org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse result = new org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse result) { if (scoresBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { scores_ = java.util.Collections.unmodifiableList(scores_); @@ -2744,8 +2654,10 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse build } else { result.scores_ = scoresBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -2818,7 +2730,7 @@ public Builder mergeFrom(org.languagetool.languagemodel.bert.grpc.BertLmProto.Be } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2833,17 +2745,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction m = + input.readMessage( + org.languagetool.languagemodel.bert.grpc.BertLmProto.Prediction.parser(), + extensionRegistry); + if (scoresBuilder_ == null) { + ensureScoresIsMutable(); + scores_.add(m); + } else { + scoresBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -3120,7 +3058,18 @@ public BertLmResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BertLmResponse(input, extensionRegistry); + 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(); } }; @@ -3191,61 +3140,6 @@ protected java.lang.Object newInstance( return new BatchScoreRequest(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchScoreRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requests_.add( - input.readMessage(org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requests_ = java.util.Collections.unmodifiableList(requests_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.languagemodel.bert.grpc.BertLmProto.internal_static_bert_BatchScoreRequest_descriptor; @@ -3260,6 +3154,7 @@ private BatchScoreRequest( } public static final int REQUESTS_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List requests_; /** * repeated .bert.ScoreRequest requests = 1; @@ -3316,7 +3211,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < requests_.size(); i++) { output.writeMessage(1, requests_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3329,7 +3224,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, requests_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3346,7 +3241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequestsList() .equals(other.getRequestsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3361,7 +3256,7 @@ public int hashCode() { hash = (37 * hash) + REQUESTS_FIELD_NUMBER; hash = (53 * hash) + getRequestsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3410,11 +3305,13 @@ public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreReq return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -3478,29 +3375,25 @@ public static final class Builder extends // Construct using org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRequestsFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (requestsBuilder_ == null) { requests_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + requests_ = null; requestsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -3527,7 +3420,13 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest bu @java.lang.Override public org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest buildPartial() { org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest result = new org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest result) { if (requestsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); @@ -3537,8 +3436,10 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest bu } else { result.requests_ = requestsBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -3611,7 +3512,7 @@ public Builder mergeFrom(org.languagetool.languagemodel.bert.grpc.BertLmProto.Ba } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3626,17 +3527,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest m = + input.readMessage( + org.languagetool.languagemodel.bert.grpc.BertLmProto.ScoreRequest.parser(), + extensionRegistry); + if (requestsBuilder_ == null) { + ensureRequestsIsMutable(); + requests_.add(m); + } else { + requestsBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchScoreRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -3913,7 +3840,18 @@ public BatchScoreRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchScoreRequest(input, extensionRegistry); + 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(); } }; @@ -3984,61 +3922,6 @@ protected java.lang.Object newInstance( return new BatchBertLmResponse(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private BatchBertLmResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - responses_.add( - input.readMessage(org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - responses_ = java.util.Collections.unmodifiableList(responses_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.languagemodel.bert.grpc.BertLmProto.internal_static_bert_BatchBertLmResponse_descriptor; @@ -4053,6 +3936,7 @@ private BatchBertLmResponse( } public static final int RESPONSES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List responses_; /** * repeated .bert.BertLmResponse responses = 1; @@ -4109,7 +3993,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < responses_.size(); i++) { output.writeMessage(1, responses_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4122,7 +4006,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, responses_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4139,7 +4023,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResponsesList() .equals(other.getResponsesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4154,7 +4038,7 @@ public int hashCode() { hash = (37 * hash) + RESPONSES_FIELD_NUMBER; hash = (53 * hash) + getResponsesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4203,11 +4087,13 @@ public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmRe return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -4271,29 +4157,25 @@ public static final class Builder extends // Construct using org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getResponsesFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (responsesBuilder_ == null) { responses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + responses_ = null; responsesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -4320,7 +4202,13 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse @java.lang.Override public org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse buildPartial() { org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse result = new org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse result) { if (responsesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); @@ -4330,8 +4218,10 @@ public org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse } else { result.responses_ = responsesBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -4404,7 +4294,7 @@ public Builder mergeFrom(org.languagetool.languagemodel.bert.grpc.BertLmProto.Ba } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4419,17 +4309,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse m = + input.readMessage( + org.languagetool.languagemodel.bert.grpc.BertLmProto.BertLmResponse.parser(), + extensionRegistry); + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(m); + } else { + responsesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.languagemodel.bert.grpc.BertLmProto.BatchBertLmResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -4706,7 +4622,18 @@ public BatchBertLmResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BatchBertLmResponse(input, extensionRegistry); + 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(); } }; diff --git a/languagetool-core/src/main/java/org/languagetool/rules/ml/MLServerGrpc.java b/languagetool-core/src/main/java/org/languagetool/rules/ml/MLServerGrpc.java index 0a91cc3cefdf..9db43b92a096 100644 --- a/languagetool-core/src/main/java/org/languagetool/rules/ml/MLServerGrpc.java +++ b/languagetool-core/src/main/java/org/languagetool/rules/ml/MLServerGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", + value = "by gRPC proto compiler (version 1.68.0)", comments = "Source: ml_server.proto") @io.grpc.stub.annotations.GrpcGenerated public final class MLServerGrpc { private MLServerGrpc() {} - public static final String SERVICE_NAME = "lt_ml_server.MLServer"; + public static final java.lang.String SERVICE_NAME = "lt_ml_server.MLServer"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMatchMethod(), responseObserver); } /** */ - public void matchAnalyzed(org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest request, + default void matchAnalyzed(org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMatchAnalyzedMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service MLServer. + */ + public static abstract class MLServerImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getMatchMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - org.languagetool.rules.ml.MLServerProto.MatchRequest, - org.languagetool.rules.ml.MLServerProto.MatchResponse>( - this, METHODID_MATCH))) - .addMethod( - getMatchAnalyzedMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest, - org.languagetool.rules.ml.MLServerProto.MatchResponse>( - this, METHODID_MATCH_ANALYZED))) - .build(); + return MLServerGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service MLServer. */ - public static final class MLServerStub extends io.grpc.stub.AbstractAsyncStub { + public static final class MLServerStub + extends io.grpc.stub.AbstractAsyncStub { private MLServerStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -191,8 +185,10 @@ public void matchAnalyzed(org.languagetool.rules.ml.MLServerProto.AnalyzedMatchR } /** + * A stub to allow clients to do synchronous rpc calls to service MLServer. */ - public static final class MLServerBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class MLServerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private MLServerBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -220,8 +216,10 @@ public org.languagetool.rules.ml.MLServerProto.MatchResponse matchAnalyzed(org.l } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service MLServer. */ - public static final class MLServerFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class MLServerFutureStub + extends io.grpc.stub.AbstractFutureStub { private MLServerFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -258,10 +256,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final MLServerImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(MLServerImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -294,6 +292,25 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getMatchMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.languagetool.rules.ml.MLServerProto.MatchRequest, + org.languagetool.rules.ml.MLServerProto.MatchResponse>( + service, METHODID_MATCH))) + .addMethod( + getMatchAnalyzedMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest, + org.languagetool.rules.ml.MLServerProto.MatchResponse>( + service, METHODID_MATCH_ANALYZED))) + .build(); + } + private static abstract class MLServerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { MLServerBaseDescriptorSupplier() {} @@ -317,9 +334,9 @@ private static final class MLServerFileDescriptorSupplier private static final class MLServerMethodDescriptorSupplier extends MLServerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - MLServerMethodDescriptorSupplier(String methodName) { + MLServerMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/languagetool-core/src/main/java/org/languagetool/rules/ml/MLServerProto.java b/languagetool-core/src/main/java/org/languagetool/rules/ml/MLServerProto.java index a17de71c9a03..b83ef3680025 100644 --- a/languagetool-core/src/main/java/org/languagetool/rules/ml/MLServerProto.java +++ b/languagetool-core/src/main/java/org/languagetool/rules/ml/MLServerProto.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: ml_server.proto +// Protobuf Java Version: 3.25.5 package org.languagetool.rules.ml; public final class MLServerProto { @@ -72,67 +73,6 @@ protected java.lang.Object newInstance( return new AnalyzeRequest(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - text_ = s; - break; - } - case 18: { - org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Builder subBuilder = null; - if (options_ != null) { - subBuilder = options_.toBuilder(); - } - options_ = input.readMessage(org.languagetool.rules.ml.MLServerProto.ProcessingOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(options_); - options_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_AnalyzeRequest_descriptor; @@ -146,8 +86,10 @@ private AnalyzeRequest( org.languagetool.rules.ml.MLServerProto.AnalyzeRequest.class, org.languagetool.rules.ml.MLServerProto.AnalyzeRequest.Builder.class); } + private int bitField0_; public static final int TEXT_FIELD_NUMBER = 1; - private volatile java.lang.Object text_; + @SuppressWarnings("serial") + private volatile java.lang.Object text_ = ""; /** * string text = 1; * @return The text. @@ -192,7 +134,7 @@ public java.lang.String getText() { */ @java.lang.Override public boolean hasOptions() { - return options_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * .lt_ml_server.ProcessingOptions options = 2; @@ -207,7 +149,7 @@ public org.languagetool.rules.ml.MLServerProto.ProcessingOptions getOptions() { */ @java.lang.Override public org.languagetool.rules.ml.MLServerProto.ProcessingOptionsOrBuilder getOptionsOrBuilder() { - return getOptions(); + return options_ == null ? org.languagetool.rules.ml.MLServerProto.ProcessingOptions.getDefaultInstance() : options_; } private byte memoizedIsInitialized = -1; @@ -224,13 +166,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_); } - if (options_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getOptions()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -239,14 +181,14 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getTextBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_); } - if (options_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getOptions()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -268,7 +210,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOptions() .equals(other.getOptions())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -285,7 +227,7 @@ public int hashCode() { hash = (37 * hash) + OPTIONS_FIELD_NUMBER; hash = (53 * hash) + getOptions().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -334,11 +276,13 @@ public static org.languagetool.rules.ml.MLServerProto.AnalyzeRequest parseFrom( return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.rules.ml.MLServerProto.AnalyzeRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.rules.ml.MLServerProto.AnalyzeRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -417,17 +361,17 @@ private Builder( private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { + getOptionsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; text_ = ""; - - if (optionsBuilder_ == null) { - options_ = null; - } else { - options_ = null; + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); optionsBuilder_ = null; } return this; @@ -456,16 +400,26 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzeRequest build() { @java.lang.Override public org.languagetool.rules.ml.MLServerProto.AnalyzeRequest buildPartial() { org.languagetool.rules.ml.MLServerProto.AnalyzeRequest result = new org.languagetool.rules.ml.MLServerProto.AnalyzeRequest(this); - result.text_ = text_; - if (optionsBuilder_ == null) { - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); - } + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(org.languagetool.rules.ml.MLServerProto.AnalyzeRequest result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.text_ = text_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.options_ = optionsBuilder_ == null + ? options_ + : optionsBuilder_.build(); + to_bitField0_ |= 0x00000001; + } + result.bitField0_ |= to_bitField0_; + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -512,12 +466,13 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzeRequest if (other == org.languagetool.rules.ml.MLServerProto.AnalyzeRequest.getDefaultInstance()) return this; if (!other.getText().isEmpty()) { text_ = other.text_; + bitField0_ |= 0x00000001; onChanged(); } if (other.hasOptions()) { mergeOptions(other.getOptions()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -532,19 +487,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.rules.ml.MLServerProto.AnalyzeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + text_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + input.readMessage( + getOptionsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.rules.ml.MLServerProto.AnalyzeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private java.lang.Object text_ = ""; /** @@ -587,11 +568,9 @@ public java.lang.String getText() { */ public Builder setText( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } text_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -600,8 +579,8 @@ public Builder setText( * @return This builder for chaining. */ public Builder clearText() { - text_ = getDefaultInstance().getText(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -612,12 +591,10 @@ public Builder clearText() { */ public Builder setTextBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); text_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -630,7 +607,7 @@ public Builder setTextBytes( * @return Whether the options field is set. */ public boolean hasOptions() { - return optionsBuilder_ != null || options_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * .lt_ml_server.ProcessingOptions options = 2; @@ -652,11 +629,11 @@ public Builder setOptions(org.languagetool.rules.ml.MLServerProto.ProcessingOpti throw new NullPointerException(); } options_ = value; - onChanged(); } else { optionsBuilder_.setMessage(value); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -666,11 +643,11 @@ public Builder setOptions( org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Builder builderForValue) { if (optionsBuilder_ == null) { options_ = builderForValue.build(); - onChanged(); } else { optionsBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -678,38 +655,40 @@ public Builder setOptions( */ public Builder mergeOptions(org.languagetool.rules.ml.MLServerProto.ProcessingOptions value) { if (optionsBuilder_ == null) { - if (options_ != null) { - options_ = - org.languagetool.rules.ml.MLServerProto.ProcessingOptions.newBuilder(options_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && + options_ != null && + options_ != org.languagetool.rules.ml.MLServerProto.ProcessingOptions.getDefaultInstance()) { + getOptionsBuilder().mergeFrom(value); } else { options_ = value; } - onChanged(); } else { optionsBuilder_.mergeFrom(value); } - + if (options_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** * .lt_ml_server.ProcessingOptions options = 2; */ public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = null; - onChanged(); - } else { - options_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); optionsBuilder_ = null; } - + onChanged(); return this; } /** * .lt_ml_server.ProcessingOptions options = 2; */ public org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Builder getOptionsBuilder() { - + bitField0_ |= 0x00000002; onChanged(); return getOptionsFieldBuilder().getBuilder(); } @@ -773,7 +752,18 @@ public AnalyzeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeRequest(input, extensionRegistry); + 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(); } }; @@ -903,8 +893,10 @@ private ProcessingOptions(com.google.protobuf.GeneratedMessageV3.Builder buil private ProcessingOptions() { language_ = ""; level_ = 0; - enabledRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; - disabledRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + enabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + disabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -914,100 +906,6 @@ protected java.lang.Object newInstance( return new ProcessingOptions(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProcessingOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - language_ = s; - break; - } - case 16: { - - tempOff_ = input.readBool(); - break; - } - case 24: { - int rawValue = input.readEnum(); - - level_ = rawValue; - break; - } - case 32: { - - premium_ = input.readBool(); - break; - } - case 40: { - - enabledOnly_ = input.readBool(); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - enabledRules_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - enabledRules_.add(s); - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - disabledRules_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - disabledRules_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - enabledRules_ = enabledRules_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - disabledRules_ = disabledRules_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_ProcessingOptions_descriptor; @@ -1202,7 +1100,8 @@ private Level(int value) { } public static final int LANGUAGE_FIELD_NUMBER = 1; - private volatile java.lang.Object language_; + @SuppressWarnings("serial") + private volatile java.lang.Object language_ = ""; /** * string language = 1; * @return The language. @@ -1240,7 +1139,7 @@ public java.lang.String getLanguage() { } public static final int TEMPOFF_FIELD_NUMBER = 2; - private boolean tempOff_; + private boolean tempOff_ = false; /** * bool tempOff = 2; * @return The tempOff. @@ -1251,7 +1150,7 @@ public boolean getTempOff() { } public static final int LEVEL_FIELD_NUMBER = 3; - private int level_; + private int level_ = 0; /** * .lt_ml_server.ProcessingOptions.Level level = 3; * @return The enum numeric value on the wire for level. @@ -1264,13 +1163,12 @@ public boolean getTempOff() { * @return The level. */ @java.lang.Override public org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level getLevel() { - @SuppressWarnings("deprecation") - org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level result = org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level.valueOf(level_); + org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level result = org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level.forNumber(level_); return result == null ? org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level.UNRECOGNIZED : result; } public static final int PREMIUM_FIELD_NUMBER = 4; - private boolean premium_; + private boolean premium_ = false; /** * bool premium = 4; * @return The premium. @@ -1281,7 +1179,7 @@ public boolean getPremium() { } public static final int ENABLEDONLY_FIELD_NUMBER = 5; - private boolean enabledOnly_; + private boolean enabledOnly_ = false; /** * bool enabledOnly = 5; * @return The enabledOnly. @@ -1292,7 +1190,9 @@ public boolean getEnabledOnly() { } public static final int ENABLEDRULES_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList enabledRules_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList enabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * repeated string enabledRules = 6; * @return A list containing the enabledRules. @@ -1327,7 +1227,9 @@ public java.lang.String getEnabledRules(int index) { } public static final int DISABLEDRULES_FIELD_NUMBER = 7; - private com.google.protobuf.LazyStringList disabledRules_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList disabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * repeated string disabledRules = 7; * @return A list containing the disabledRules. @@ -1375,7 +1277,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getLanguageBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(language_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, language_); } if (tempOff_ != false) { @@ -1396,7 +1298,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < disabledRules_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, disabledRules_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1405,7 +1307,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getLanguageBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(language_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, language_); } if (tempOff_ != false) { @@ -1440,7 +1342,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getDisabledRulesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1468,7 +1370,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getEnabledRulesList())) return false; if (!getDisabledRulesList() .equals(other.getDisabledRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1500,7 +1402,7 @@ public int hashCode() { hash = (37 * hash) + DISABLEDRULES_FIELD_NUMBER; hash = (53 * hash) + getDisabledRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1549,11 +1451,13 @@ public static org.languagetool.rules.ml.MLServerProto.ProcessingOptions parseFro return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.rules.ml.MLServerProto.ProcessingOptions parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.rules.ml.MLServerProto.ProcessingOptions parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -1617,36 +1521,27 @@ public static final class Builder extends // Construct using org.languagetool.rules.ml.MLServerProto.ProcessingOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; language_ = ""; - tempOff_ = false; - level_ = 0; - premium_ = false; - enabledOnly_ = false; - - enabledRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - disabledRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + enabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + disabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -1673,24 +1568,36 @@ public org.languagetool.rules.ml.MLServerProto.ProcessingOptions build() { @java.lang.Override public org.languagetool.rules.ml.MLServerProto.ProcessingOptions buildPartial() { org.languagetool.rules.ml.MLServerProto.ProcessingOptions result = new org.languagetool.rules.ml.MLServerProto.ProcessingOptions(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(org.languagetool.rules.ml.MLServerProto.ProcessingOptions result) { int from_bitField0_ = bitField0_; - result.language_ = language_; - result.tempOff_ = tempOff_; - result.level_ = level_; - result.premium_ = premium_; - result.enabledOnly_ = enabledOnly_; - if (((bitField0_ & 0x00000001) != 0)) { - enabledRules_ = enabledRules_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); + if (((from_bitField0_ & 0x00000001) != 0)) { + result.language_ = language_; } - result.enabledRules_ = enabledRules_; - if (((bitField0_ & 0x00000002) != 0)) { - disabledRules_ = disabledRules_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); + if (((from_bitField0_ & 0x00000002) != 0)) { + result.tempOff_ = tempOff_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.level_ = level_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.premium_ = premium_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.enabledOnly_ = enabledOnly_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + enabledRules_.makeImmutable(); + result.enabledRules_ = enabledRules_; + } + if (((from_bitField0_ & 0x00000040) != 0)) { + disabledRules_.makeImmutable(); + result.disabledRules_ = disabledRules_; } - result.disabledRules_ = disabledRules_; - onBuilt(); - return result; } @java.lang.Override @@ -1739,6 +1646,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.ProcessingOptio if (other == org.languagetool.rules.ml.MLServerProto.ProcessingOptions.getDefaultInstance()) return this; if (!other.getLanguage().isEmpty()) { language_ = other.language_; + bitField0_ |= 0x00000001; onChanged(); } if (other.getTempOff() != false) { @@ -1756,7 +1664,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.ProcessingOptio if (!other.enabledRules_.isEmpty()) { if (enabledRules_.isEmpty()) { enabledRules_ = other.enabledRules_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ |= 0x00000020; } else { ensureEnabledRulesIsMutable(); enabledRules_.addAll(other.enabledRules_); @@ -1766,14 +1674,14 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.ProcessingOptio if (!other.disabledRules_.isEmpty()) { if (disabledRules_.isEmpty()) { disabledRules_ = other.disabledRules_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ |= 0x00000040; } else { ensureDisabledRulesIsMutable(); disabledRules_.addAll(other.disabledRules_); } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1788,17 +1696,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.rules.ml.MLServerProto.ProcessingOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + language_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 16: { + tempOff_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + case 24: { + level_ = input.readEnum(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: { + premium_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + case 40: { + enabledOnly_ = input.readBool(); + bitField0_ |= 0x00000010; + break; + } // case 40 + case 50: { + java.lang.String s = input.readStringRequireUtf8(); + ensureEnabledRulesIsMutable(); + enabledRules_.add(s); + break; + } // case 50 + case 58: { + java.lang.String s = input.readStringRequireUtf8(); + ensureDisabledRulesIsMutable(); + disabledRules_.add(s); + break; + } // case 58 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.rules.ml.MLServerProto.ProcessingOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -1844,11 +1802,9 @@ public java.lang.String getLanguage() { */ public Builder setLanguage( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } language_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1857,8 +1813,8 @@ public Builder setLanguage( * @return This builder for chaining. */ public Builder clearLanguage() { - language_ = getDefaultInstance().getLanguage(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -1869,12 +1825,10 @@ public Builder clearLanguage() { */ public Builder setLanguageBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); language_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1894,8 +1848,9 @@ public boolean getTempOff() { * @return This builder for chaining. */ public Builder setTempOff(boolean value) { - + tempOff_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1904,7 +1859,7 @@ public Builder setTempOff(boolean value) { * @return This builder for chaining. */ public Builder clearTempOff() { - + bitField0_ = (bitField0_ & ~0x00000002); tempOff_ = false; onChanged(); return this; @@ -1924,8 +1879,8 @@ public Builder clearTempOff() { * @return This builder for chaining. */ public Builder setLevelValue(int value) { - level_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -1935,8 +1890,7 @@ public Builder setLevelValue(int value) { */ @java.lang.Override public org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level getLevel() { - @SuppressWarnings("deprecation") - org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level result = org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level.valueOf(level_); + org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level result = org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level.forNumber(level_); return result == null ? org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Level.UNRECOGNIZED : result; } /** @@ -1948,7 +1902,7 @@ public Builder setLevel(org.languagetool.rules.ml.MLServerProto.ProcessingOption if (value == null) { throw new NullPointerException(); } - + bitField0_ |= 0x00000004; level_ = value.getNumber(); onChanged(); return this; @@ -1958,7 +1912,7 @@ public Builder setLevel(org.languagetool.rules.ml.MLServerProto.ProcessingOption * @return This builder for chaining. */ public Builder clearLevel() { - + bitField0_ = (bitField0_ & ~0x00000004); level_ = 0; onChanged(); return this; @@ -1979,8 +1933,9 @@ public boolean getPremium() { * @return This builder for chaining. */ public Builder setPremium(boolean value) { - + premium_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1989,7 +1944,7 @@ public Builder setPremium(boolean value) { * @return This builder for chaining. */ public Builder clearPremium() { - + bitField0_ = (bitField0_ & ~0x00000008); premium_ = false; onChanged(); return this; @@ -2010,8 +1965,9 @@ public boolean getEnabledOnly() { * @return This builder for chaining. */ public Builder setEnabledOnly(boolean value) { - + enabledOnly_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -2020,18 +1976,19 @@ public Builder setEnabledOnly(boolean value) { * @return This builder for chaining. */ public Builder clearEnabledOnly() { - + bitField0_ = (bitField0_ & ~0x00000010); enabledOnly_ = false; onChanged(); return this; } - private com.google.protobuf.LazyStringList enabledRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList enabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureEnabledRulesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!enabledRules_.isModifiable()) { enabledRules_ = new com.google.protobuf.LazyStringArrayList(enabledRules_); - bitField0_ |= 0x00000001; - } + } + bitField0_ |= 0x00000020; } /** * repeated string enabledRules = 6; @@ -2039,7 +1996,8 @@ private void ensureEnabledRulesIsMutable() { */ public com.google.protobuf.ProtocolStringList getEnabledRulesList() { - return enabledRules_.getUnmodifiableView(); + enabledRules_.makeImmutable(); + return enabledRules_; } /** * repeated string enabledRules = 6; @@ -2073,11 +2031,10 @@ public java.lang.String getEnabledRules(int index) { */ public Builder setEnabledRules( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnabledRulesIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureEnabledRulesIsMutable(); enabledRules_.set(index, value); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2088,11 +2045,10 @@ public Builder setEnabledRules( */ public Builder addEnabledRules( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureEnabledRulesIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureEnabledRulesIsMutable(); enabledRules_.add(value); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2106,6 +2062,7 @@ public Builder addAllEnabledRules( ensureEnabledRulesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, enabledRules_); + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2114,8 +2071,9 @@ public Builder addAllEnabledRules( * @return This builder for chaining. */ public Builder clearEnabledRules() { - enabledRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + enabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020);; onChanged(); return this; } @@ -2126,22 +2084,22 @@ public Builder clearEnabledRules() { */ public Builder addEnabledRulesBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureEnabledRulesIsMutable(); enabledRules_.add(value); + bitField0_ |= 0x00000020; onChanged(); return this; } - private com.google.protobuf.LazyStringList disabledRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList disabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureDisabledRulesIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!disabledRules_.isModifiable()) { disabledRules_ = new com.google.protobuf.LazyStringArrayList(disabledRules_); - bitField0_ |= 0x00000002; - } + } + bitField0_ |= 0x00000040; } /** * repeated string disabledRules = 7; @@ -2149,7 +2107,8 @@ private void ensureDisabledRulesIsMutable() { */ public com.google.protobuf.ProtocolStringList getDisabledRulesList() { - return disabledRules_.getUnmodifiableView(); + disabledRules_.makeImmutable(); + return disabledRules_; } /** * repeated string disabledRules = 7; @@ -2183,11 +2142,10 @@ public java.lang.String getDisabledRules(int index) { */ public Builder setDisabledRules( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDisabledRulesIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureDisabledRulesIsMutable(); disabledRules_.set(index, value); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2198,11 +2156,10 @@ public Builder setDisabledRules( */ public Builder addDisabledRules( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDisabledRulesIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureDisabledRulesIsMutable(); disabledRules_.add(value); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2216,6 +2173,7 @@ public Builder addAllDisabledRules( ensureDisabledRulesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, disabledRules_); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2224,8 +2182,9 @@ public Builder addAllDisabledRules( * @return This builder for chaining. */ public Builder clearDisabledRules() { - disabledRules_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + disabledRules_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000040);; onChanged(); return this; } @@ -2236,12 +2195,11 @@ public Builder clearDisabledRules() { */ public Builder addDisabledRulesBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureDisabledRulesIsMutable(); disabledRules_.add(value); + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2278,7 +2236,18 @@ public ProcessingOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProcessingOptions(input, extensionRegistry); + 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(); } }; @@ -2349,61 +2318,6 @@ protected java.lang.Object newInstance( return new AnalyzeResponse(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzeResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sentences_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sentences_.add( - input.readMessage(org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sentences_ = java.util.Collections.unmodifiableList(sentences_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_AnalyzeResponse_descriptor; @@ -2418,6 +2332,7 @@ private AnalyzeResponse( } public static final int SENTENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List sentences_; /** * repeated .lt_ml_server.AnalyzedSentence sentences = 1; @@ -2474,7 +2389,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < sentences_.size(); i++) { output.writeMessage(1, sentences_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2487,7 +2402,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, sentences_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2504,7 +2419,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSentencesList() .equals(other.getSentencesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2519,7 +2434,7 @@ public int hashCode() { hash = (37 * hash) + SENTENCES_FIELD_NUMBER; hash = (53 * hash) + getSentencesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2568,11 +2483,13 @@ public static org.languagetool.rules.ml.MLServerProto.AnalyzeResponse parseFrom( return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.rules.ml.MLServerProto.AnalyzeResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.rules.ml.MLServerProto.AnalyzeResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -2636,29 +2553,25 @@ public static final class Builder extends // Construct using org.languagetool.rules.ml.MLServerProto.AnalyzeResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getSentencesFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (sentencesBuilder_ == null) { sentences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + sentences_ = null; sentencesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2685,7 +2598,13 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzeResponse build() { @java.lang.Override public org.languagetool.rules.ml.MLServerProto.AnalyzeResponse buildPartial() { org.languagetool.rules.ml.MLServerProto.AnalyzeResponse result = new org.languagetool.rules.ml.MLServerProto.AnalyzeResponse(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.AnalyzeResponse result) { if (sentencesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { sentences_ = java.util.Collections.unmodifiableList(sentences_); @@ -2695,8 +2614,10 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzeResponse buildPartial() { } else { result.sentences_ = sentencesBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(org.languagetool.rules.ml.MLServerProto.AnalyzeResponse result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -2769,7 +2690,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzeResponse } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2784,17 +2705,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.rules.ml.MLServerProto.AnalyzeResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.languagetool.rules.ml.MLServerProto.AnalyzedSentence m = + input.readMessage( + org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.parser(), + extensionRegistry); + if (sentencesBuilder_ == null) { + ensureSentencesIsMutable(); + sentences_.add(m); + } else { + sentencesBuilder_.addMessage(m); + } + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.rules.ml.MLServerProto.AnalyzeResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -3071,7 +3018,18 @@ public AnalyzeResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AnalyzeResponse(input, extensionRegistry); + 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(); } }; @@ -3157,74 +3115,6 @@ protected java.lang.Object newInstance( return new ProcessRequest(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProcessRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sentences_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sentences_.add( - input.readMessage(org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.parser(), extensionRegistry)); - break; - } - case 18: { - org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Builder subBuilder = null; - if (options_ != null) { - subBuilder = options_.toBuilder(); - } - options_ = input.readMessage(org.languagetool.rules.ml.MLServerProto.ProcessingOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(options_); - options_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sentences_ = java.util.Collections.unmodifiableList(sentences_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_ProcessRequest_descriptor; @@ -3238,7 +3128,9 @@ private ProcessRequest( org.languagetool.rules.ml.MLServerProto.ProcessRequest.class, org.languagetool.rules.ml.MLServerProto.ProcessRequest.Builder.class); } + private int bitField0_; public static final int SENTENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List sentences_; /** * repeated .lt_ml_server.AnalyzedSentence sentences = 1; @@ -3286,7 +3178,7 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedSentenceOrBuilder getSent */ @java.lang.Override public boolean hasOptions() { - return options_ != null; + return ((bitField0_ & 0x00000001) != 0); } /** * .lt_ml_server.ProcessingOptions options = 2; @@ -3301,7 +3193,7 @@ public org.languagetool.rules.ml.MLServerProto.ProcessingOptions getOptions() { */ @java.lang.Override public org.languagetool.rules.ml.MLServerProto.ProcessingOptionsOrBuilder getOptionsOrBuilder() { - return getOptions(); + return options_ == null ? org.languagetool.rules.ml.MLServerProto.ProcessingOptions.getDefaultInstance() : options_; } private byte memoizedIsInitialized = -1; @@ -3321,10 +3213,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < sentences_.size(); i++) { output.writeMessage(1, sentences_.get(i)); } - if (options_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(2, getOptions()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3337,11 +3229,11 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, sentences_.get(i)); } - if (options_ != null) { + if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getOptions()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3363,7 +3255,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOptions() .equals(other.getOptions())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3382,7 +3274,7 @@ public int hashCode() { hash = (37 * hash) + OPTIONS_FIELD_NUMBER; hash = (53 * hash) + getOptions().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3431,11 +3323,13 @@ public static org.languagetool.rules.ml.MLServerProto.ProcessRequest parseFrom( return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.rules.ml.MLServerProto.ProcessRequest parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.rules.ml.MLServerProto.ProcessRequest parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -3511,21 +3405,23 @@ private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getSentencesFieldBuilder(); + getOptionsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (sentencesBuilder_ == null) { sentences_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + sentences_ = null; sentencesBuilder_.clear(); } - if (optionsBuilder_ == null) { - options_ = null; - } else { - options_ = null; + bitField0_ = (bitField0_ & ~0x00000001); + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); optionsBuilder_ = null; } return this; @@ -3554,7 +3450,13 @@ public org.languagetool.rules.ml.MLServerProto.ProcessRequest build() { @java.lang.Override public org.languagetool.rules.ml.MLServerProto.ProcessRequest buildPartial() { org.languagetool.rules.ml.MLServerProto.ProcessRequest result = new org.languagetool.rules.ml.MLServerProto.ProcessRequest(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.ProcessRequest result) { if (sentencesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { sentences_ = java.util.Collections.unmodifiableList(sentences_); @@ -3564,13 +3466,18 @@ public org.languagetool.rules.ml.MLServerProto.ProcessRequest buildPartial() { } else { result.sentences_ = sentencesBuilder_.build(); } - if (optionsBuilder_ == null) { - result.options_ = options_; - } else { - result.options_ = optionsBuilder_.build(); + } + + private void buildPartial0(org.languagetool.rules.ml.MLServerProto.ProcessRequest result) { + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.options_ = optionsBuilder_ == null + ? options_ + : optionsBuilder_.build(); + to_bitField0_ |= 0x00000001; } - onBuilt(); - return result; + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -3646,7 +3553,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.ProcessRequest if (other.hasOptions()) { mergeOptions(other.getOptions()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3661,17 +3568,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.rules.ml.MLServerProto.ProcessRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.languagetool.rules.ml.MLServerProto.AnalyzedSentence m = + input.readMessage( + org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.parser(), + extensionRegistry); + if (sentencesBuilder_ == null) { + ensureSentencesIsMutable(); + sentences_.add(m); + } else { + sentencesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getOptionsFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (org.languagetool.rules.ml.MLServerProto.ProcessRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -3924,7 +3864,7 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.Builder addSente * @return Whether the options field is set. */ public boolean hasOptions() { - return optionsBuilder_ != null || options_ != null; + return ((bitField0_ & 0x00000002) != 0); } /** * .lt_ml_server.ProcessingOptions options = 2; @@ -3946,11 +3886,11 @@ public Builder setOptions(org.languagetool.rules.ml.MLServerProto.ProcessingOpti throw new NullPointerException(); } options_ = value; - onChanged(); } else { optionsBuilder_.setMessage(value); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -3960,11 +3900,11 @@ public Builder setOptions( org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Builder builderForValue) { if (optionsBuilder_ == null) { options_ = builderForValue.build(); - onChanged(); } else { optionsBuilder_.setMessage(builderForValue.build()); } - + bitField0_ |= 0x00000002; + onChanged(); return this; } /** @@ -3972,38 +3912,40 @@ public Builder setOptions( */ public Builder mergeOptions(org.languagetool.rules.ml.MLServerProto.ProcessingOptions value) { if (optionsBuilder_ == null) { - if (options_ != null) { - options_ = - org.languagetool.rules.ml.MLServerProto.ProcessingOptions.newBuilder(options_).mergeFrom(value).buildPartial(); + if (((bitField0_ & 0x00000002) != 0) && + options_ != null && + options_ != org.languagetool.rules.ml.MLServerProto.ProcessingOptions.getDefaultInstance()) { + getOptionsBuilder().mergeFrom(value); } else { options_ = value; } - onChanged(); } else { optionsBuilder_.mergeFrom(value); } - + if (options_ != null) { + bitField0_ |= 0x00000002; + onChanged(); + } return this; } /** * .lt_ml_server.ProcessingOptions options = 2; */ public Builder clearOptions() { - if (optionsBuilder_ == null) { - options_ = null; - onChanged(); - } else { - options_ = null; + bitField0_ = (bitField0_ & ~0x00000002); + options_ = null; + if (optionsBuilder_ != null) { + optionsBuilder_.dispose(); optionsBuilder_ = null; } - + onChanged(); return this; } /** * .lt_ml_server.ProcessingOptions options = 2; */ public org.languagetool.rules.ml.MLServerProto.ProcessingOptions.Builder getOptionsBuilder() { - + bitField0_ |= 0x00000002; onChanged(); return getOptionsFieldBuilder().getBuilder(); } @@ -4067,7 +4009,18 @@ public ProcessRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProcessRequest(input, extensionRegistry); + 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(); } }; @@ -4147,89 +4100,22 @@ public static final class ProcessResponse extends // @@protoc_insertion_point(message_implements:lt_ml_server.ProcessResponse) ProcessResponseOrBuilder { private static final long serialVersionUID = 0L; - // Use ProcessResponse.newBuilder() to construct. - private ProcessResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - private ProcessResponse() { - rawMatches_ = java.util.Collections.emptyList(); - matches_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance( - UnusedPrivateParameter unused) { - return new ProcessResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ProcessResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - rawMatches_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - rawMatches_.add( - input.readMessage(org.languagetool.rules.ml.MLServerProto.Match.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - matches_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - matches_.add( - input.readMessage(org.languagetool.rules.ml.MLServerProto.Match.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - rawMatches_ = java.util.Collections.unmodifiableList(rawMatches_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - matches_ = java.util.Collections.unmodifiableList(matches_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + // Use ProcessResponse.newBuilder() to construct. + private ProcessResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private ProcessResponse() { + rawMatches_ = java.util.Collections.emptyList(); + matches_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new ProcessResponse(); } + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_ProcessResponse_descriptor; @@ -4244,6 +4130,7 @@ private ProcessResponse( } public static final int RAWMATCHES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List rawMatches_; /** * repeated .lt_ml_server.Match rawMatches = 1; @@ -4284,6 +4171,7 @@ public org.languagetool.rules.ml.MLServerProto.MatchOrBuilder getRawMatchesOrBui } public static final int MATCHES_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List matches_; /** * repeated .lt_ml_server.Match matches = 2; @@ -4343,7 +4231,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < matches_.size(); i++) { output.writeMessage(2, matches_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4360,7 +4248,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, matches_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4379,7 +4267,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getRawMatchesList())) return false; if (!getMatchesList() .equals(other.getMatchesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4398,7 +4286,7 @@ public int hashCode() { hash = (37 * hash) + MATCHES_FIELD_NUMBER; hash = (53 * hash) + getMatchesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4447,11 +4335,13 @@ public static org.languagetool.rules.ml.MLServerProto.ProcessResponse parseFrom( return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static org.languagetool.rules.ml.MLServerProto.ProcessResponse parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static org.languagetool.rules.ml.MLServerProto.ProcessResponse parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -4515,36 +4405,32 @@ public static final class Builder extends // Construct using org.languagetool.rules.ml.MLServerProto.ProcessResponse.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getRawMatchesFieldBuilder(); - getMatchesFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (rawMatchesBuilder_ == null) { rawMatches_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + rawMatches_ = null; rawMatchesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (matchesBuilder_ == null) { matches_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + matches_ = null; matchesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -4571,7 +4457,13 @@ public org.languagetool.rules.ml.MLServerProto.ProcessResponse build() { @java.lang.Override public org.languagetool.rules.ml.MLServerProto.ProcessResponse buildPartial() { org.languagetool.rules.ml.MLServerProto.ProcessResponse result = new org.languagetool.rules.ml.MLServerProto.ProcessResponse(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.ProcessResponse result) { if (rawMatchesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { rawMatches_ = java.util.Collections.unmodifiableList(rawMatches_); @@ -4590,8 +4482,10 @@ public org.languagetool.rules.ml.MLServerProto.ProcessResponse buildPartial() { } else { result.matches_ = matchesBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(org.languagetool.rules.ml.MLServerProto.ProcessResponse result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -4690,7 +4584,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.ProcessResponse } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4705,17 +4599,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - org.languagetool.rules.ml.MLServerProto.ProcessResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + org.languagetool.rules.ml.MLServerProto.Match m = + input.readMessage( + org.languagetool.rules.ml.MLServerProto.Match.parser(), + extensionRegistry); + if (rawMatchesBuilder_ == null) { + ensureRawMatchesIsMutable(); + rawMatches_.add(m); + } else { + rawMatchesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + org.languagetool.rules.ml.MLServerProto.Match m = + input.readMessage( + org.languagetool.rules.ml.MLServerProto.Match.parser(), + extensionRegistry); + if (matchesBuilder_ == null) { + ensureMatchesIsMutable(); + matches_.add(m); + } else { + matchesBuilder_.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) { - parsedMessage = (org.languagetool.rules.ml.MLServerProto.ProcessResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -5232,7 +5165,18 @@ public ProcessResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProcessResponse(input, extensionRegistry); + 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(); } }; @@ -5343,90 +5287,6 @@ protected java.lang.Object newInstance( return new AnalyzedMatchRequest(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AnalyzedMatchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - sentences_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - sentences_.add( - input.readMessage(org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.parser(), extensionRegistry)); - break; - } - case 16: { - - inputLogging_ = input.readBool(); - break; - } - case 24: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - textSessionID_ = newLongList(); - mutable_bitField0_ |= 0x00000002; - } - textSessionID_.addLong(input.readInt64()); - break; - } - case 26: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - textSessionID_ = newLongList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - textSessionID_.addLong(input.readInt64()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - sentences_ = java.util.Collections.unmodifiableList(sentences_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - textSessionID_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_AnalyzedMatchRequest_descriptor; @@ -5441,6 +5301,7 @@ private AnalyzedMatchRequest( } public static final int SENTENCES_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List sentences_; /** * repeated .lt_ml_server.AnalyzedSentence sentences = 1; @@ -5481,7 +5342,7 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedSentenceOrBuilder getSent } public static final int INPUTLOGGING_FIELD_NUMBER = 2; - private boolean inputLogging_; + private boolean inputLogging_ = false; /** *
      * allow logging of input on error
@@ -5496,7 +5357,9 @@ public boolean getInputLogging() {
     }
 
     public static final int TEXTSESSIONID_FIELD_NUMBER = 3;
-    private com.google.protobuf.Internal.LongList textSessionID_;
+    @SuppressWarnings("serial")
+    private com.google.protobuf.Internal.LongList textSessionID_ =
+        emptyLongList();
     /**
      * 
      * session ID, for partial rollout & A/B tests
@@ -5563,7 +5426,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       for (int i = 0; i < textSessionID_.size(); i++) {
         output.writeInt64NoTag(textSessionID_.getLong(i));
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -5594,7 +5457,7 @@ public int getSerializedSize() {
         }
         textSessionIDMemoizedSerializedSize = dataSize;
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -5615,7 +5478,7 @@ public boolean equals(final java.lang.Object obj) {
           != other.getInputLogging()) return false;
       if (!getTextSessionIDList()
           .equals(other.getTextSessionIDList())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -5637,7 +5500,7 @@ public int hashCode() {
         hash = (37 * hash) + TEXTSESSIONID_FIELD_NUMBER;
         hash = (53 * hash) + getTextSessionIDList().hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -5686,11 +5549,13 @@ public static org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest parse
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -5754,33 +5619,27 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-          getSentencesFieldBuilder();
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         if (sentencesBuilder_ == null) {
           sentences_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
+          sentences_ = null;
           sentencesBuilder_.clear();
         }
+        bitField0_ = (bitField0_ & ~0x00000001);
         inputLogging_ = false;
-
         textSessionID_ = emptyLongList();
-        bitField0_ = (bitField0_ & ~0x00000002);
         return this;
       }
 
@@ -5807,7 +5666,13 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest buildPartial() {
         org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest result = new org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest(this);
-        int from_bitField0_ = bitField0_;
+        buildPartialRepeatedFields(result);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest result) {
         if (sentencesBuilder_ == null) {
           if (((bitField0_ & 0x00000001) != 0)) {
             sentences_ = java.util.Collections.unmodifiableList(sentences_);
@@ -5817,14 +5682,17 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest buildPartial
         } else {
           result.sentences_ = sentencesBuilder_.build();
         }
-        result.inputLogging_ = inputLogging_;
-        if (((bitField0_ & 0x00000002) != 0)) {
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.inputLogging_ = inputLogging_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
           textSessionID_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000002);
+          result.textSessionID_ = textSessionID_;
         }
-        result.textSessionID_ = textSessionID_;
-        onBuilt();
-        return result;
       }
 
       @java.lang.Override
@@ -5903,14 +5771,15 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRe
         if (!other.textSessionID_.isEmpty()) {
           if (textSessionID_.isEmpty()) {
             textSessionID_ = other.textSessionID_;
-            bitField0_ = (bitField0_ & ~0x00000002);
+            textSessionID_.makeImmutable();
+            bitField0_ |= 0x00000004;
           } else {
             ensureTextSessionIDIsMutable();
             textSessionID_.addAll(other.textSessionID_);
           }
           onChanged();
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -5925,17 +5794,64 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                org.languagetool.rules.ml.MLServerProto.AnalyzedSentence m =
+                    input.readMessage(
+                        org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.parser(),
+                        extensionRegistry);
+                if (sentencesBuilder_ == null) {
+                  ensureSentencesIsMutable();
+                  sentences_.add(m);
+                } else {
+                  sentencesBuilder_.addMessage(m);
+                }
+                break;
+              } // case 10
+              case 16: {
+                inputLogging_ = input.readBool();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 16
+              case 24: {
+                long v = input.readInt64();
+                ensureTextSessionIDIsMutable();
+                textSessionID_.addLong(v);
+                break;
+              } // case 24
+              case 26: {
+                int length = input.readRawVarint32();
+                int limit = input.pushLimit(length);
+                ensureTextSessionIDIsMutable();
+                while (input.getBytesUntilLimit() > 0) {
+                  textSessionID_.addLong(input.readInt64());
+                }
+                input.popLimit(limit);
+                break;
+              } // case 26
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.AnalyzedMatchRequest) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
@@ -6203,8 +6119,9 @@ public boolean getInputLogging() {
        * @return This builder for chaining.
        */
       public Builder setInputLogging(boolean value) {
-        
+
         inputLogging_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -6217,7 +6134,7 @@ public Builder setInputLogging(boolean value) {
        * @return This builder for chaining.
        */
       public Builder clearInputLogging() {
-        
+        bitField0_ = (bitField0_ & ~0x00000002);
         inputLogging_ = false;
         onChanged();
         return this;
@@ -6225,10 +6142,10 @@ public Builder clearInputLogging() {
 
       private com.google.protobuf.Internal.LongList textSessionID_ = emptyLongList();
       private void ensureTextSessionIDIsMutable() {
-        if (!((bitField0_ & 0x00000002) != 0)) {
-          textSessionID_ = mutableCopy(textSessionID_);
-          bitField0_ |= 0x00000002;
-         }
+        if (!textSessionID_.isModifiable()) {
+          textSessionID_ = makeMutableCopy(textSessionID_);
+        }
+        bitField0_ |= 0x00000004;
       }
       /**
        * 
@@ -6240,8 +6157,8 @@ private void ensureTextSessionIDIsMutable() {
        */
       public java.util.List
           getTextSessionIDList() {
-        return ((bitField0_ & 0x00000002) != 0) ?
-                 java.util.Collections.unmodifiableList(textSessionID_) : textSessionID_;
+        textSessionID_.makeImmutable();
+        return textSessionID_;
       }
       /**
        * 
@@ -6278,8 +6195,10 @@ public long getTextSessionID(int index) {
        */
       public Builder setTextSessionID(
           int index, long value) {
+
         ensureTextSessionIDIsMutable();
         textSessionID_.setLong(index, value);
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -6293,8 +6212,10 @@ public Builder setTextSessionID(
        * @return This builder for chaining.
        */
       public Builder addTextSessionID(long value) {
+
         ensureTextSessionIDIsMutable();
         textSessionID_.addLong(value);
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -6312,6 +6233,7 @@ public Builder addAllTextSessionID(
         ensureTextSessionIDIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, textSessionID_);
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -6325,7 +6247,7 @@ public Builder addAllTextSessionID(
        */
       public Builder clearTextSessionID() {
         textSessionID_ = emptyLongList();
-        bitField0_ = (bitField0_ & ~0x00000002);
+        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -6362,7 +6284,18 @@ public AnalyzedMatchRequest parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new AnalyzedMatchRequest(input, extensionRegistry);
+        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();
       }
     };
 
@@ -6446,67 +6379,6 @@ protected java.lang.Object newInstance(
       return new AnalyzedSentence();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private AnalyzedSentence(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              text_ = s;
-              break;
-            }
-            case 18: {
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                tokens_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              tokens_.add(
-                  input.readMessage(org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.parser(), extensionRegistry));
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          tokens_ = java.util.Collections.unmodifiableList(tokens_);
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_AnalyzedSentence_descriptor;
@@ -6521,7 +6393,8 @@ private AnalyzedSentence(
     }
 
     public static final int TEXT_FIELD_NUMBER = 1;
-    private volatile java.lang.Object text_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object text_ = "";
     /**
      * string text = 1;
      * @return The text.
@@ -6559,6 +6432,7 @@ public java.lang.String getText() {
     }
 
     public static final int TOKENS_FIELD_NUMBER = 2;
+    @SuppressWarnings("serial")
     private java.util.List tokens_;
     /**
      * repeated .lt_ml_server.AnalyzedTokenReadings tokens = 2;
@@ -6612,13 +6486,13 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!getTextBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, text_);
       }
       for (int i = 0; i < tokens_.size(); i++) {
         output.writeMessage(2, tokens_.get(i));
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -6627,14 +6501,14 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!getTextBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(text_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, text_);
       }
       for (int i = 0; i < tokens_.size(); i++) {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(2, tokens_.get(i));
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -6653,7 +6527,7 @@ public boolean equals(final java.lang.Object obj) {
           .equals(other.getText())) return false;
       if (!getTokensList()
           .equals(other.getTokensList())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -6670,7 +6544,7 @@ public int hashCode() {
         hash = (37 * hash) + TOKENS_FIELD_NUMBER;
         hash = (53 * hash) + getTokensList().hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -6719,11 +6593,13 @@ public static org.languagetool.rules.ml.MLServerProto.AnalyzedSentence parseFrom
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.AnalyzedSentence parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.AnalyzedSentence parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -6787,31 +6663,26 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-          getTokensFieldBuilder();
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         text_ = "";
-
         if (tokensBuilder_ == null) {
           tokens_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
+          tokens_ = null;
           tokensBuilder_.clear();
         }
+        bitField0_ = (bitField0_ & ~0x00000002);
         return this;
       }
 
@@ -6838,19 +6709,29 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedSentence build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.AnalyzedSentence buildPartial() {
         org.languagetool.rules.ml.MLServerProto.AnalyzedSentence result = new org.languagetool.rules.ml.MLServerProto.AnalyzedSentence(this);
-        int from_bitField0_ = bitField0_;
-        result.text_ = text_;
+        buildPartialRepeatedFields(result);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.AnalyzedSentence result) {
         if (tokensBuilder_ == null) {
-          if (((bitField0_ & 0x00000001) != 0)) {
+          if (((bitField0_ & 0x00000002) != 0)) {
             tokens_ = java.util.Collections.unmodifiableList(tokens_);
-            bitField0_ = (bitField0_ & ~0x00000001);
+            bitField0_ = (bitField0_ & ~0x00000002);
           }
           result.tokens_ = tokens_;
         } else {
           result.tokens_ = tokensBuilder_.build();
         }
-        onBuilt();
-        return result;
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.AnalyzedSentence result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          result.text_ = text_;
+        }
       }
 
       @java.lang.Override
@@ -6899,13 +6780,14 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzedSentenc
         if (other == org.languagetool.rules.ml.MLServerProto.AnalyzedSentence.getDefaultInstance()) return this;
         if (!other.getText().isEmpty()) {
           text_ = other.text_;
+          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (tokensBuilder_ == null) {
           if (!other.tokens_.isEmpty()) {
             if (tokens_.isEmpty()) {
               tokens_ = other.tokens_;
-              bitField0_ = (bitField0_ & ~0x00000001);
+              bitField0_ = (bitField0_ & ~0x00000002);
             } else {
               ensureTokensIsMutable();
               tokens_.addAll(other.tokens_);
@@ -6918,7 +6800,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzedSentenc
               tokensBuilder_.dispose();
               tokensBuilder_ = null;
               tokens_ = other.tokens_;
-              bitField0_ = (bitField0_ & ~0x00000001);
+              bitField0_ = (bitField0_ & ~0x00000002);
               tokensBuilder_ = 
                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                    getTokensFieldBuilder() : null;
@@ -6927,7 +6809,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzedSentenc
             }
           }
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -6942,17 +6824,48 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.AnalyzedSentence parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                text_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 10
+              case 18: {
+                org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings m =
+                    input.readMessage(
+                        org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.parser(),
+                        extensionRegistry);
+                if (tokensBuilder_ == null) {
+                  ensureTokensIsMutable();
+                  tokens_.add(m);
+                } else {
+                  tokensBuilder_.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) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.AnalyzedSentence) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
@@ -6998,11 +6911,9 @@ public java.lang.String getText() {
        */
       public Builder setText(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         text_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -7011,8 +6922,8 @@ public Builder setText(
        * @return This builder for chaining.
        */
       public Builder clearText() {
-        
         text_ = getDefaultInstance().getText();
+        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -7023,12 +6934,10 @@ public Builder clearText() {
        */
       public Builder setTextBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         text_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -7036,9 +6945,9 @@ public Builder setTextBytes(
       private java.util.List tokens_ =
         java.util.Collections.emptyList();
       private void ensureTokensIsMutable() {
-        if (!((bitField0_ & 0x00000001) != 0)) {
+        if (!((bitField0_ & 0x00000002) != 0)) {
           tokens_ = new java.util.ArrayList(tokens_);
-          bitField0_ |= 0x00000001;
+          bitField0_ |= 0x00000002;
          }
       }
 
@@ -7188,7 +7097,7 @@ public Builder addAllTokens(
       public Builder clearTokens() {
         if (tokensBuilder_ == null) {
           tokens_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000001);
+          bitField0_ = (bitField0_ & ~0x00000002);
           onChanged();
         } else {
           tokensBuilder_.clear();
@@ -7265,7 +7174,7 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.Builder add
           tokensBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
               org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings, org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.Builder, org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadingsOrBuilder>(
                   tokens_,
-                  ((bitField0_ & 0x00000001) != 0),
+                  ((bitField0_ & 0x00000002) != 0),
                   getParentForChildren(),
                   isClean());
           tokens_ = null;
@@ -7305,7 +7214,18 @@ public AnalyzedSentence parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new AnalyzedSentence(input, extensionRegistry);
+        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();
       }
     };
 
@@ -7398,7 +7318,8 @@ private AnalyzedTokenReadings(com.google.protobuf.GeneratedMessageV3.Builder
     }
     private AnalyzedTokenReadings() {
       readings_ = java.util.Collections.emptyList();
-      chunkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      chunkTags_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
     }
 
     @java.lang.Override
@@ -7408,78 +7329,6 @@ protected java.lang.Object newInstance(
       return new AnalyzedTokenReadings();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private AnalyzedTokenReadings(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                readings_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              readings_.add(
-                  input.readMessage(org.languagetool.rules.ml.MLServerProto.AnalyzedToken.parser(), extensionRegistry));
-              break;
-            }
-            case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
-              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                chunkTags_ = new com.google.protobuf.LazyStringArrayList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              chunkTags_.add(s);
-              break;
-            }
-            case 24: {
-
-              startPos_ = input.readInt32();
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          readings_ = java.util.Collections.unmodifiableList(readings_);
-        }
-        if (((mutable_bitField0_ & 0x00000002) != 0)) {
-          chunkTags_ = chunkTags_.getUnmodifiableView();
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_AnalyzedTokenReadings_descriptor;
@@ -7494,6 +7343,7 @@ private AnalyzedTokenReadings(
     }
 
     public static final int READINGS_FIELD_NUMBER = 1;
+    @SuppressWarnings("serial")
     private java.util.List readings_;
     /**
      * repeated .lt_ml_server.AnalyzedToken readings = 1;
@@ -7534,7 +7384,9 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedTokenOrBuilder getReading
     }
 
     public static final int CHUNKTAGS_FIELD_NUMBER = 2;
-    private com.google.protobuf.LazyStringList chunkTags_;
+    @SuppressWarnings("serial")
+    private com.google.protobuf.LazyStringArrayList chunkTags_ =
+        com.google.protobuf.LazyStringArrayList.emptyList();
     /**
      * repeated string chunkTags = 2;
      * @return A list containing the chunkTags.
@@ -7569,7 +7421,7 @@ public java.lang.String getChunkTags(int index) {
     }
 
     public static final int STARTPOS_FIELD_NUMBER = 3;
-    private int startPos_;
+    private int startPos_ = 0;
     /**
      * int32 startPos = 3;
      * @return The startPos.
@@ -7602,7 +7454,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (startPos_ != 0) {
         output.writeInt32(3, startPos_);
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -7627,7 +7479,7 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeInt32Size(3, startPos_);
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -7648,7 +7500,7 @@ public boolean equals(final java.lang.Object obj) {
           .equals(other.getChunkTagsList())) return false;
       if (getStartPos()
           != other.getStartPos()) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -7669,7 +7521,7 @@ public int hashCode() {
       }
       hash = (37 * hash) + STARTPOS_FIELD_NUMBER;
       hash = (53 * hash) + getStartPos();
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -7718,11 +7570,13 @@ public static org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings pars
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -7786,33 +7640,28 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-          getReadingsFieldBuilder();
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         if (readingsBuilder_ == null) {
           readings_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
+          readings_ = null;
           readingsBuilder_.clear();
         }
-        chunkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000002);
+        bitField0_ = (bitField0_ & ~0x00000001);
+        chunkTags_ =
+            com.google.protobuf.LazyStringArrayList.emptyList();
         startPos_ = 0;
-
         return this;
       }
 
@@ -7839,7 +7688,13 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings buildPartial() {
         org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings result = new org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings(this);
-        int from_bitField0_ = bitField0_;
+        buildPartialRepeatedFields(result);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings result) {
         if (readingsBuilder_ == null) {
           if (((bitField0_ & 0x00000001) != 0)) {
             readings_ = java.util.Collections.unmodifiableList(readings_);
@@ -7849,14 +7704,17 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings buildPartia
         } else {
           result.readings_ = readingsBuilder_.build();
         }
-        if (((bitField0_ & 0x00000002) != 0)) {
-          chunkTags_ = chunkTags_.getUnmodifiableView();
-          bitField0_ = (bitField0_ & ~0x00000002);
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          chunkTags_.makeImmutable();
+          result.chunkTags_ = chunkTags_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
+          result.startPos_ = startPos_;
         }
-        result.chunkTags_ = chunkTags_;
-        result.startPos_ = startPos_;
-        onBuilt();
-        return result;
       }
 
       @java.lang.Override
@@ -7932,7 +7790,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzedTokenRe
         if (!other.chunkTags_.isEmpty()) {
           if (chunkTags_.isEmpty()) {
             chunkTags_ = other.chunkTags_;
-            bitField0_ = (bitField0_ & ~0x00000002);
+            bitField0_ |= 0x00000002;
           } else {
             ensureChunkTagsIsMutable();
             chunkTags_.addAll(other.chunkTags_);
@@ -7942,7 +7800,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzedTokenRe
         if (other.getStartPos() != 0) {
           setStartPos(other.getStartPos());
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -7957,17 +7815,54 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                org.languagetool.rules.ml.MLServerProto.AnalyzedToken m =
+                    input.readMessage(
+                        org.languagetool.rules.ml.MLServerProto.AnalyzedToken.parser(),
+                        extensionRegistry);
+                if (readingsBuilder_ == null) {
+                  ensureReadingsIsMutable();
+                  readings_.add(m);
+                } else {
+                  readingsBuilder_.addMessage(m);
+                }
+                break;
+              } // case 10
+              case 18: {
+                java.lang.String s = input.readStringRequireUtf8();
+                ensureChunkTagsIsMutable();
+                chunkTags_.add(s);
+                break;
+              } // case 18
+              case 24: {
+                startPos_ = 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) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.AnalyzedTokenReadings) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
@@ -8212,12 +8107,13 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedToken.Builder addReadings
         return readingsBuilder_;
       }
 
-      private com.google.protobuf.LazyStringList chunkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      private com.google.protobuf.LazyStringArrayList chunkTags_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
       private void ensureChunkTagsIsMutable() {
-        if (!((bitField0_ & 0x00000002) != 0)) {
+        if (!chunkTags_.isModifiable()) {
           chunkTags_ = new com.google.protobuf.LazyStringArrayList(chunkTags_);
-          bitField0_ |= 0x00000002;
-         }
+        }
+        bitField0_ |= 0x00000002;
       }
       /**
        * repeated string chunkTags = 2;
@@ -8225,7 +8121,8 @@ private void ensureChunkTagsIsMutable() {
        */
       public com.google.protobuf.ProtocolStringList
           getChunkTagsList() {
-        return chunkTags_.getUnmodifiableView();
+        chunkTags_.makeImmutable();
+        return chunkTags_;
       }
       /**
        * repeated string chunkTags = 2;
@@ -8259,11 +8156,10 @@ public java.lang.String getChunkTags(int index) {
        */
       public Builder setChunkTags(
           int index, java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureChunkTagsIsMutable();
+        if (value == null) { throw new NullPointerException(); }
+        ensureChunkTagsIsMutable();
         chunkTags_.set(index, value);
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -8274,11 +8170,10 @@ public Builder setChunkTags(
        */
       public Builder addChunkTags(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureChunkTagsIsMutable();
+        if (value == null) { throw new NullPointerException(); }
+        ensureChunkTagsIsMutable();
         chunkTags_.add(value);
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -8292,6 +8187,7 @@ public Builder addAllChunkTags(
         ensureChunkTagsIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, chunkTags_);
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -8300,8 +8196,9 @@ public Builder addAllChunkTags(
        * @return This builder for chaining.
        */
       public Builder clearChunkTags() {
-        chunkTags_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000002);
+        chunkTags_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
+        bitField0_ = (bitField0_ & ~0x00000002);;
         onChanged();
         return this;
       }
@@ -8312,12 +8209,11 @@ public Builder clearChunkTags() {
        */
       public Builder addChunkTagsBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         ensureChunkTagsIsMutable();
         chunkTags_.add(value);
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -8337,8 +8233,9 @@ public int getStartPos() {
        * @return This builder for chaining.
        */
       public Builder setStartPos(int value) {
-        
+
         startPos_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -8347,7 +8244,7 @@ public Builder setStartPos(int value) {
        * @return This builder for chaining.
        */
       public Builder clearStartPos() {
-        
+        bitField0_ = (bitField0_ & ~0x00000004);
         startPos_ = 0;
         onChanged();
         return this;
@@ -8385,7 +8282,18 @@ public AnalyzedTokenReadings parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new AnalyzedTokenReadings(input, extensionRegistry);
+        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();
       }
     };
 
@@ -8470,66 +8378,6 @@ protected java.lang.Object newInstance(
       return new AnalyzedToken();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private AnalyzedToken(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              token_ = s;
-              break;
-            }
-            case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              posTag_ = s;
-              break;
-            }
-            case 26: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              lemma_ = s;
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_AnalyzedToken_descriptor;
@@ -8544,7 +8392,8 @@ private AnalyzedToken(
     }
 
     public static final int TOKEN_FIELD_NUMBER = 1;
-    private volatile java.lang.Object token_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object token_ = "";
     /**
      * string token = 1;
      * @return The token.
@@ -8582,7 +8431,8 @@ public java.lang.String getToken() {
     }
 
     public static final int POSTAG_FIELD_NUMBER = 2;
-    private volatile java.lang.Object posTag_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object posTag_ = "";
     /**
      * string posTag = 2;
      * @return The posTag.
@@ -8620,7 +8470,8 @@ public java.lang.String getPosTag() {
     }
 
     public static final int LEMMA_FIELD_NUMBER = 3;
-    private volatile java.lang.Object lemma_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object lemma_ = "";
     /**
      * string lemma = 3;
      * @return The lemma.
@@ -8671,16 +8522,16 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!getTokenBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, token_);
       }
-      if (!getPosTagBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(posTag_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, posTag_);
       }
-      if (!getLemmaBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lemma_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 3, lemma_);
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -8689,16 +8540,16 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!getTokenBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(token_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, token_);
       }
-      if (!getPosTagBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(posTag_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, posTag_);
       }
-      if (!getLemmaBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(lemma_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, lemma_);
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -8719,7 +8570,7 @@ public boolean equals(final java.lang.Object obj) {
           .equals(other.getPosTag())) return false;
       if (!getLemma()
           .equals(other.getLemma())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -8736,7 +8587,7 @@ public int hashCode() {
       hash = (53 * hash) + getPosTag().hashCode();
       hash = (37 * hash) + LEMMA_FIELD_NUMBER;
       hash = (53 * hash) + getLemma().hashCode();
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -8785,11 +8636,13 @@ public static org.languagetool.rules.ml.MLServerProto.AnalyzedToken parseFrom(
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.AnalyzedToken parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.AnalyzedToken parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -8853,28 +8706,21 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.AnalyzedToken.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         token_ = "";
-
         posTag_ = "";
-
         lemma_ = "";
-
         return this;
       }
 
@@ -8901,13 +8747,24 @@ public org.languagetool.rules.ml.MLServerProto.AnalyzedToken build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.AnalyzedToken buildPartial() {
         org.languagetool.rules.ml.MLServerProto.AnalyzedToken result = new org.languagetool.rules.ml.MLServerProto.AnalyzedToken(this);
-        result.token_ = token_;
-        result.posTag_ = posTag_;
-        result.lemma_ = lemma_;
+        if (bitField0_ != 0) { buildPartial0(result); }
         onBuilt();
         return result;
       }
 
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.AnalyzedToken result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          result.token_ = token_;
+        }
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.posTag_ = posTag_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
+          result.lemma_ = lemma_;
+        }
+      }
+
       @java.lang.Override
       public Builder clone() {
         return super.clone();
@@ -8954,17 +8811,20 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.AnalyzedToken o
         if (other == org.languagetool.rules.ml.MLServerProto.AnalyzedToken.getDefaultInstance()) return this;
         if (!other.getToken().isEmpty()) {
           token_ = other.token_;
+          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getPosTag().isEmpty()) {
           posTag_ = other.posTag_;
+          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getLemma().isEmpty()) {
           lemma_ = other.lemma_;
+          bitField0_ |= 0x00000004;
           onChanged();
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -8979,19 +8839,48 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.AnalyzedToken parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                token_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 10
+              case 18: {
+                posTag_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 18
+              case 26: {
+                lemma_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 26
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.AnalyzedToken) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
+      private int bitField0_;
 
       private java.lang.Object token_ = "";
       /**
@@ -9034,11 +8923,9 @@ public java.lang.String getToken() {
        */
       public Builder setToken(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         token_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -9047,8 +8934,8 @@ public Builder setToken(
        * @return This builder for chaining.
        */
       public Builder clearToken() {
-        
         token_ = getDefaultInstance().getToken();
+        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -9059,12 +8946,10 @@ public Builder clearToken() {
        */
       public Builder setTokenBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         token_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -9110,11 +8995,9 @@ public java.lang.String getPosTag() {
        */
       public Builder setPosTag(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         posTag_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -9123,8 +9006,8 @@ public Builder setPosTag(
        * @return This builder for chaining.
        */
       public Builder clearPosTag() {
-        
         posTag_ = getDefaultInstance().getPosTag();
+        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -9135,12 +9018,10 @@ public Builder clearPosTag() {
        */
       public Builder setPosTagBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         posTag_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -9186,11 +9067,9 @@ public java.lang.String getLemma() {
        */
       public Builder setLemma(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         lemma_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -9199,8 +9078,8 @@ public Builder setLemma(
        * @return This builder for chaining.
        */
       public Builder clearLemma() {
-        
         lemma_ = getDefaultInstance().getLemma();
+        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -9211,12 +9090,10 @@ public Builder clearLemma() {
        */
       public Builder setLemmaBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         lemma_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -9253,7 +9130,18 @@ public AnalyzedToken parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new AnalyzedToken(input, extensionRegistry);
+        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();
       }
     };
 
@@ -9414,7 +9302,8 @@ private PostProcessingRequest(com.google.protobuf.GeneratedMessageV3.Builder
       super(builder);
     }
     private PostProcessingRequest() {
-      sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      sentences_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
       matches_ = java.util.Collections.emptyList();
       textSessionID_ = emptyLongList();
     }
@@ -9426,102 +9315,6 @@ protected java.lang.Object newInstance(
       return new PostProcessingRequest();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private PostProcessingRequest(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                sentences_ = new com.google.protobuf.LazyStringArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              sentences_.add(s);
-              break;
-            }
-            case 18: {
-              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                matches_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              matches_.add(
-                  input.readMessage(org.languagetool.rules.ml.MLServerProto.MatchList.parser(), extensionRegistry));
-              break;
-            }
-            case 24: {
-
-              inputLogging_ = input.readBool();
-              break;
-            }
-            case 32: {
-              if (!((mutable_bitField0_ & 0x00000004) != 0)) {
-                textSessionID_ = newLongList();
-                mutable_bitField0_ |= 0x00000004;
-              }
-              textSessionID_.addLong(input.readInt64());
-              break;
-            }
-            case 34: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
-                textSessionID_ = newLongList();
-                mutable_bitField0_ |= 0x00000004;
-              }
-              while (input.getBytesUntilLimit() > 0) {
-                textSessionID_.addLong(input.readInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          sentences_ = sentences_.getUnmodifiableView();
-        }
-        if (((mutable_bitField0_ & 0x00000002) != 0)) {
-          matches_ = java.util.Collections.unmodifiableList(matches_);
-        }
-        if (((mutable_bitField0_ & 0x00000004) != 0)) {
-          textSessionID_.makeImmutable(); // C
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_PostProcessingRequest_descriptor;
@@ -9536,7 +9329,9 @@ private PostProcessingRequest(
     }
 
     public static final int SENTENCES_FIELD_NUMBER = 1;
-    private com.google.protobuf.LazyStringList sentences_;
+    @SuppressWarnings("serial")
+    private com.google.protobuf.LazyStringArrayList sentences_ =
+        com.google.protobuf.LazyStringArrayList.emptyList();
     /**
      * 
      * input text to be analyzed
@@ -9587,6 +9382,7 @@ public java.lang.String getSentences(int index) {
     }
 
     public static final int MATCHES_FIELD_NUMBER = 2;
+    @SuppressWarnings("serial")
     private java.util.List matches_;
     /**
      * 
@@ -9647,7 +9443,7 @@ public org.languagetool.rules.ml.MLServerProto.MatchListOrBuilder getMatchesOrBu
     }
 
     public static final int INPUTLOGGING_FIELD_NUMBER = 3;
-    private boolean inputLogging_;
+    private boolean inputLogging_ = false;
     /**
      * 
      * allow logging of input on error
@@ -9662,7 +9458,9 @@ public boolean getInputLogging() {
     }
 
     public static final int TEXTSESSIONID_FIELD_NUMBER = 4;
-    private com.google.protobuf.Internal.LongList textSessionID_;
+    @SuppressWarnings("serial")
+    private com.google.protobuf.Internal.LongList textSessionID_ =
+        emptyLongList();
     /**
      * 
      * session ID, for partial rollout & A/B tests
@@ -9732,7 +9530,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       for (int i = 0; i < textSessionID_.size(); i++) {
         output.writeInt64NoTag(textSessionID_.getLong(i));
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -9771,7 +9569,7 @@ public int getSerializedSize() {
         }
         textSessionIDMemoizedSerializedSize = dataSize;
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -9794,7 +9592,7 @@ public boolean equals(final java.lang.Object obj) {
           != other.getInputLogging()) return false;
       if (!getTextSessionIDList()
           .equals(other.getTextSessionIDList())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -9820,7 +9618,7 @@ public int hashCode() {
         hash = (37 * hash) + TEXTSESSIONID_FIELD_NUMBER;
         hash = (53 * hash) + getTextSessionIDList().hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -9869,11 +9667,13 @@ public static org.languagetool.rules.ml.MLServerProto.PostProcessingRequest pars
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.PostProcessingRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.PostProcessingRequest parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -9937,35 +9737,29 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.PostProcessingRequest.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-          getMatchesFieldBuilder();
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
+        bitField0_ = 0;
+        sentences_ =
+            com.google.protobuf.LazyStringArrayList.emptyList();
         if (matchesBuilder_ == null) {
           matches_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000002);
         } else {
+          matches_ = null;
           matchesBuilder_.clear();
         }
+        bitField0_ = (bitField0_ & ~0x00000002);
         inputLogging_ = false;
-
         textSessionID_ = emptyLongList();
-        bitField0_ = (bitField0_ & ~0x00000004);
         return this;
       }
 
@@ -9992,12 +9786,13 @@ public org.languagetool.rules.ml.MLServerProto.PostProcessingRequest build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.PostProcessingRequest buildPartial() {
         org.languagetool.rules.ml.MLServerProto.PostProcessingRequest result = new org.languagetool.rules.ml.MLServerProto.PostProcessingRequest(this);
-        int from_bitField0_ = bitField0_;
-        if (((bitField0_ & 0x00000001) != 0)) {
-          sentences_ = sentences_.getUnmodifiableView();
-          bitField0_ = (bitField0_ & ~0x00000001);
-        }
-        result.sentences_ = sentences_;
+        buildPartialRepeatedFields(result);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.PostProcessingRequest result) {
         if (matchesBuilder_ == null) {
           if (((bitField0_ & 0x00000002) != 0)) {
             matches_ = java.util.Collections.unmodifiableList(matches_);
@@ -10007,14 +9802,21 @@ public org.languagetool.rules.ml.MLServerProto.PostProcessingRequest buildPartia
         } else {
           result.matches_ = matchesBuilder_.build();
         }
-        result.inputLogging_ = inputLogging_;
-        if (((bitField0_ & 0x00000004) != 0)) {
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.PostProcessingRequest result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          sentences_.makeImmutable();
+          result.sentences_ = sentences_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
+          result.inputLogging_ = inputLogging_;
+        }
+        if (((from_bitField0_ & 0x00000008) != 0)) {
           textSessionID_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000004);
+          result.textSessionID_ = textSessionID_;
         }
-        result.textSessionID_ = textSessionID_;
-        onBuilt();
-        return result;
       }
 
       @java.lang.Override
@@ -10064,7 +9866,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.PostProcessingR
         if (!other.sentences_.isEmpty()) {
           if (sentences_.isEmpty()) {
             sentences_ = other.sentences_;
-            bitField0_ = (bitField0_ & ~0x00000001);
+            bitField0_ |= 0x00000001;
           } else {
             ensureSentencesIsMutable();
             sentences_.addAll(other.sentences_);
@@ -10103,14 +9905,15 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.PostProcessingR
         if (!other.textSessionID_.isEmpty()) {
           if (textSessionID_.isEmpty()) {
             textSessionID_ = other.textSessionID_;
-            bitField0_ = (bitField0_ & ~0x00000004);
+            textSessionID_.makeImmutable();
+            bitField0_ |= 0x00000008;
           } else {
             ensureTextSessionIDIsMutable();
             textSessionID_.addAll(other.textSessionID_);
           }
           onChanged();
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -10125,27 +9928,81 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.PostProcessingRequest parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                java.lang.String s = input.readStringRequireUtf8();
+                ensureSentencesIsMutable();
+                sentences_.add(s);
+                break;
+              } // case 10
+              case 18: {
+                org.languagetool.rules.ml.MLServerProto.MatchList m =
+                    input.readMessage(
+                        org.languagetool.rules.ml.MLServerProto.MatchList.parser(),
+                        extensionRegistry);
+                if (matchesBuilder_ == null) {
+                  ensureMatchesIsMutable();
+                  matches_.add(m);
+                } else {
+                  matchesBuilder_.addMessage(m);
+                }
+                break;
+              } // case 18
+              case 24: {
+                inputLogging_ = input.readBool();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 24
+              case 32: {
+                long v = input.readInt64();
+                ensureTextSessionIDIsMutable();
+                textSessionID_.addLong(v);
+                break;
+              } // case 32
+              case 34: {
+                int length = input.readRawVarint32();
+                int limit = input.pushLimit(length);
+                ensureTextSessionIDIsMutable();
+                while (input.getBytesUntilLimit() > 0) {
+                  textSessionID_.addLong(input.readInt64());
+                }
+                input.popLimit(limit);
+                break;
+              } // case 34
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.PostProcessingRequest) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
 
-      private com.google.protobuf.LazyStringList sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      private com.google.protobuf.LazyStringArrayList sentences_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
       private void ensureSentencesIsMutable() {
-        if (!((bitField0_ & 0x00000001) != 0)) {
+        if (!sentences_.isModifiable()) {
           sentences_ = new com.google.protobuf.LazyStringArrayList(sentences_);
-          bitField0_ |= 0x00000001;
-         }
+        }
+        bitField0_ |= 0x00000001;
       }
       /**
        * 
@@ -10157,7 +10014,8 @@ private void ensureSentencesIsMutable() {
        */
       public com.google.protobuf.ProtocolStringList
           getSentencesList() {
-        return sentences_.getUnmodifiableView();
+        sentences_.makeImmutable();
+        return sentences_;
       }
       /**
        * 
@@ -10207,11 +10065,10 @@ public java.lang.String getSentences(int index) {
        */
       public Builder setSentences(
           int index, java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureSentencesIsMutable();
+        if (value == null) { throw new NullPointerException(); }
+        ensureSentencesIsMutable();
         sentences_.set(index, value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -10226,11 +10083,10 @@ public Builder setSentences(
        */
       public Builder addSentences(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureSentencesIsMutable();
+        if (value == null) { throw new NullPointerException(); }
+        ensureSentencesIsMutable();
         sentences_.add(value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -10248,6 +10104,7 @@ public Builder addAllSentences(
         ensureSentencesIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, sentences_);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -10260,8 +10117,9 @@ public Builder addAllSentences(
        * @return This builder for chaining.
        */
       public Builder clearSentences() {
-        sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
+        sentences_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
+        bitField0_ = (bitField0_ & ~0x00000001);;
         onChanged();
         return this;
       }
@@ -10276,12 +10134,11 @@ public Builder clearSentences() {
        */
       public Builder addSentencesBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         ensureSentencesIsMutable();
         sentences_.add(value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -10621,8 +10478,9 @@ public boolean getInputLogging() {
        * @return This builder for chaining.
        */
       public Builder setInputLogging(boolean value) {
-        
+
         inputLogging_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -10635,7 +10493,7 @@ public Builder setInputLogging(boolean value) {
        * @return This builder for chaining.
        */
       public Builder clearInputLogging() {
-        
+        bitField0_ = (bitField0_ & ~0x00000004);
         inputLogging_ = false;
         onChanged();
         return this;
@@ -10643,10 +10501,10 @@ public Builder clearInputLogging() {
 
       private com.google.protobuf.Internal.LongList textSessionID_ = emptyLongList();
       private void ensureTextSessionIDIsMutable() {
-        if (!((bitField0_ & 0x00000004) != 0)) {
-          textSessionID_ = mutableCopy(textSessionID_);
-          bitField0_ |= 0x00000004;
-         }
+        if (!textSessionID_.isModifiable()) {
+          textSessionID_ = makeMutableCopy(textSessionID_);
+        }
+        bitField0_ |= 0x00000008;
       }
       /**
        * 
@@ -10658,8 +10516,8 @@ private void ensureTextSessionIDIsMutable() {
        */
       public java.util.List
           getTextSessionIDList() {
-        return ((bitField0_ & 0x00000004) != 0) ?
-                 java.util.Collections.unmodifiableList(textSessionID_) : textSessionID_;
+        textSessionID_.makeImmutable();
+        return textSessionID_;
       }
       /**
        * 
@@ -10696,8 +10554,10 @@ public long getTextSessionID(int index) {
        */
       public Builder setTextSessionID(
           int index, long value) {
+
         ensureTextSessionIDIsMutable();
         textSessionID_.setLong(index, value);
+        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -10711,8 +10571,10 @@ public Builder setTextSessionID(
        * @return This builder for chaining.
        */
       public Builder addTextSessionID(long value) {
+
         ensureTextSessionIDIsMutable();
         textSessionID_.addLong(value);
+        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -10730,6 +10592,7 @@ public Builder addAllTextSessionID(
         ensureTextSessionIDIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, textSessionID_);
+        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -10743,7 +10606,7 @@ public Builder addAllTextSessionID(
        */
       public Builder clearTextSessionID() {
         textSessionID_ = emptyLongList();
-        bitField0_ = (bitField0_ & ~0x00000004);
+        bitField0_ = (bitField0_ & ~0x00000008);
         onChanged();
         return this;
       }
@@ -10780,7 +10643,18 @@ public PostProcessingRequest parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new PostProcessingRequest(input, extensionRegistry);
+        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();
       }
     };
 
@@ -10897,7 +10771,8 @@ private MatchRequest(com.google.protobuf.GeneratedMessageV3.Builder builder)
       super(builder);
     }
     private MatchRequest() {
-      sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      sentences_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
       textSessionID_ = emptyLongList();
     }
 
@@ -10908,90 +10783,6 @@ protected java.lang.Object newInstance(
       return new MatchRequest();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private MatchRequest(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                sentences_ = new com.google.protobuf.LazyStringArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              sentences_.add(s);
-              break;
-            }
-            case 16: {
-
-              inputLogging_ = input.readBool();
-              break;
-            }
-            case 24: {
-              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                textSessionID_ = newLongList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              textSessionID_.addLong(input.readInt64());
-              break;
-            }
-            case 26: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
-                textSessionID_ = newLongList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              while (input.getBytesUntilLimit() > 0) {
-                textSessionID_.addLong(input.readInt64());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          sentences_ = sentences_.getUnmodifiableView();
-        }
-        if (((mutable_bitField0_ & 0x00000002) != 0)) {
-          textSessionID_.makeImmutable(); // C
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_MatchRequest_descriptor;
@@ -11006,7 +10797,9 @@ private MatchRequest(
     }
 
     public static final int SENTENCES_FIELD_NUMBER = 1;
-    private com.google.protobuf.LazyStringList sentences_;
+    @SuppressWarnings("serial")
+    private com.google.protobuf.LazyStringArrayList sentences_ =
+        com.google.protobuf.LazyStringArrayList.emptyList();
     /**
      * 
      * input text to be analyzed
@@ -11057,7 +10850,7 @@ public java.lang.String getSentences(int index) {
     }
 
     public static final int INPUTLOGGING_FIELD_NUMBER = 2;
-    private boolean inputLogging_;
+    private boolean inputLogging_ = false;
     /**
      * 
      * allow logging of input on error
@@ -11072,7 +10865,9 @@ public boolean getInputLogging() {
     }
 
     public static final int TEXTSESSIONID_FIELD_NUMBER = 3;
-    private com.google.protobuf.Internal.LongList textSessionID_;
+    @SuppressWarnings("serial")
+    private com.google.protobuf.Internal.LongList textSessionID_ =
+        emptyLongList();
     /**
      * 
      * session ID, for partial rollout & A/B tests
@@ -11139,7 +10934,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       for (int i = 0; i < textSessionID_.size(); i++) {
         output.writeInt64NoTag(textSessionID_.getLong(i));
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -11174,7 +10969,7 @@ public int getSerializedSize() {
         }
         textSessionIDMemoizedSerializedSize = dataSize;
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -11195,7 +10990,7 @@ public boolean equals(final java.lang.Object obj) {
           != other.getInputLogging()) return false;
       if (!getTextSessionIDList()
           .equals(other.getTextSessionIDList())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -11217,7 +11012,7 @@ public int hashCode() {
         hash = (37 * hash) + TEXTSESSIONID_FIELD_NUMBER;
         hash = (53 * hash) + getTextSessionIDList().hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -11266,11 +11061,13 @@ public static org.languagetool.rules.ml.MLServerProto.MatchRequest parseFrom(
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.MatchRequest parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.MatchRequest parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -11334,28 +11131,22 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.MatchRequest.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
-        sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
+        bitField0_ = 0;
+        sentences_ =
+            com.google.protobuf.LazyStringArrayList.emptyList();
         inputLogging_ = false;
-
         textSessionID_ = emptyLongList();
-        bitField0_ = (bitField0_ & ~0x00000002);
         return this;
       }
 
@@ -11382,20 +11173,24 @@ public org.languagetool.rules.ml.MLServerProto.MatchRequest build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.MatchRequest buildPartial() {
         org.languagetool.rules.ml.MLServerProto.MatchRequest result = new org.languagetool.rules.ml.MLServerProto.MatchRequest(this);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.MatchRequest result) {
         int from_bitField0_ = bitField0_;
-        if (((bitField0_ & 0x00000001) != 0)) {
-          sentences_ = sentences_.getUnmodifiableView();
-          bitField0_ = (bitField0_ & ~0x00000001);
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          sentences_.makeImmutable();
+          result.sentences_ = sentences_;
         }
-        result.sentences_ = sentences_;
-        result.inputLogging_ = inputLogging_;
-        if (((bitField0_ & 0x00000002) != 0)) {
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.inputLogging_ = inputLogging_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
           textSessionID_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000002);
+          result.textSessionID_ = textSessionID_;
         }
-        result.textSessionID_ = textSessionID_;
-        onBuilt();
-        return result;
       }
 
       @java.lang.Override
@@ -11445,7 +11240,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.MatchRequest ot
         if (!other.sentences_.isEmpty()) {
           if (sentences_.isEmpty()) {
             sentences_ = other.sentences_;
-            bitField0_ = (bitField0_ & ~0x00000001);
+            bitField0_ |= 0x00000001;
           } else {
             ensureSentencesIsMutable();
             sentences_.addAll(other.sentences_);
@@ -11458,14 +11253,15 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.MatchRequest ot
         if (!other.textSessionID_.isEmpty()) {
           if (textSessionID_.isEmpty()) {
             textSessionID_ = other.textSessionID_;
-            bitField0_ = (bitField0_ & ~0x00000002);
+            textSessionID_.makeImmutable();
+            bitField0_ |= 0x00000004;
           } else {
             ensureTextSessionIDIsMutable();
             textSessionID_.addAll(other.textSessionID_);
           }
           onChanged();
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -11480,27 +11276,68 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.MatchRequest parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                java.lang.String s = input.readStringRequireUtf8();
+                ensureSentencesIsMutable();
+                sentences_.add(s);
+                break;
+              } // case 10
+              case 16: {
+                inputLogging_ = input.readBool();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 16
+              case 24: {
+                long v = input.readInt64();
+                ensureTextSessionIDIsMutable();
+                textSessionID_.addLong(v);
+                break;
+              } // case 24
+              case 26: {
+                int length = input.readRawVarint32();
+                int limit = input.pushLimit(length);
+                ensureTextSessionIDIsMutable();
+                while (input.getBytesUntilLimit() > 0) {
+                  textSessionID_.addLong(input.readInt64());
+                }
+                input.popLimit(limit);
+                break;
+              } // case 26
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.MatchRequest) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
 
-      private com.google.protobuf.LazyStringList sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      private com.google.protobuf.LazyStringArrayList sentences_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
       private void ensureSentencesIsMutable() {
-        if (!((bitField0_ & 0x00000001) != 0)) {
+        if (!sentences_.isModifiable()) {
           sentences_ = new com.google.protobuf.LazyStringArrayList(sentences_);
-          bitField0_ |= 0x00000001;
-         }
+        }
+        bitField0_ |= 0x00000001;
       }
       /**
        * 
@@ -11512,7 +11349,8 @@ private void ensureSentencesIsMutable() {
        */
       public com.google.protobuf.ProtocolStringList
           getSentencesList() {
-        return sentences_.getUnmodifiableView();
+        sentences_.makeImmutable();
+        return sentences_;
       }
       /**
        * 
@@ -11562,11 +11400,10 @@ public java.lang.String getSentences(int index) {
        */
       public Builder setSentences(
           int index, java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureSentencesIsMutable();
+        if (value == null) { throw new NullPointerException(); }
+        ensureSentencesIsMutable();
         sentences_.set(index, value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -11581,11 +11418,10 @@ public Builder setSentences(
        */
       public Builder addSentences(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureSentencesIsMutable();
+        if (value == null) { throw new NullPointerException(); }
+        ensureSentencesIsMutable();
         sentences_.add(value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -11603,6 +11439,7 @@ public Builder addAllSentences(
         ensureSentencesIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, sentences_);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -11615,8 +11452,9 @@ public Builder addAllSentences(
        * @return This builder for chaining.
        */
       public Builder clearSentences() {
-        sentences_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
+        sentences_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
+        bitField0_ = (bitField0_ & ~0x00000001);;
         onChanged();
         return this;
       }
@@ -11631,12 +11469,11 @@ public Builder clearSentences() {
        */
       public Builder addSentencesBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         ensureSentencesIsMutable();
         sentences_.add(value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -11664,8 +11501,9 @@ public boolean getInputLogging() {
        * @return This builder for chaining.
        */
       public Builder setInputLogging(boolean value) {
-        
+
         inputLogging_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -11678,7 +11516,7 @@ public Builder setInputLogging(boolean value) {
        * @return This builder for chaining.
        */
       public Builder clearInputLogging() {
-        
+        bitField0_ = (bitField0_ & ~0x00000002);
         inputLogging_ = false;
         onChanged();
         return this;
@@ -11686,10 +11524,10 @@ public Builder clearInputLogging() {
 
       private com.google.protobuf.Internal.LongList textSessionID_ = emptyLongList();
       private void ensureTextSessionIDIsMutable() {
-        if (!((bitField0_ & 0x00000002) != 0)) {
-          textSessionID_ = mutableCopy(textSessionID_);
-          bitField0_ |= 0x00000002;
-         }
+        if (!textSessionID_.isModifiable()) {
+          textSessionID_ = makeMutableCopy(textSessionID_);
+        }
+        bitField0_ |= 0x00000004;
       }
       /**
        * 
@@ -11701,8 +11539,8 @@ private void ensureTextSessionIDIsMutable() {
        */
       public java.util.List
           getTextSessionIDList() {
-        return ((bitField0_ & 0x00000002) != 0) ?
-                 java.util.Collections.unmodifiableList(textSessionID_) : textSessionID_;
+        textSessionID_.makeImmutable();
+        return textSessionID_;
       }
       /**
        * 
@@ -11739,8 +11577,10 @@ public long getTextSessionID(int index) {
        */
       public Builder setTextSessionID(
           int index, long value) {
+
         ensureTextSessionIDIsMutable();
         textSessionID_.setLong(index, value);
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -11754,8 +11594,10 @@ public Builder setTextSessionID(
        * @return This builder for chaining.
        */
       public Builder addTextSessionID(long value) {
+
         ensureTextSessionIDIsMutable();
         textSessionID_.addLong(value);
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -11773,6 +11615,7 @@ public Builder addAllTextSessionID(
         ensureTextSessionIDIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, textSessionID_);
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -11786,7 +11629,7 @@ public Builder addAllTextSessionID(
        */
       public Builder clearTextSessionID() {
         textSessionID_ = emptyLongList();
-        bitField0_ = (bitField0_ & ~0x00000002);
+        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -11823,7 +11666,18 @@ public MatchRequest parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new MatchRequest(input, extensionRegistry);
+        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();
       }
     };
 
@@ -11914,61 +11768,6 @@ protected java.lang.Object newInstance(
       return new MatchResponse();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private MatchResponse(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                sentenceMatches_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              sentenceMatches_.add(
-                  input.readMessage(org.languagetool.rules.ml.MLServerProto.MatchList.parser(), extensionRegistry));
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          sentenceMatches_ = java.util.Collections.unmodifiableList(sentenceMatches_);
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_MatchResponse_descriptor;
@@ -11983,6 +11782,7 @@ private MatchResponse(
     }
 
     public static final int SENTENCEMATCHES_FIELD_NUMBER = 1;
+    @SuppressWarnings("serial")
     private java.util.List sentenceMatches_;
     /**
      * 
@@ -12059,7 +11859,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       for (int i = 0; i < sentenceMatches_.size(); i++) {
         output.writeMessage(1, sentenceMatches_.get(i));
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -12072,7 +11872,7 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(1, sentenceMatches_.get(i));
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -12089,7 +11889,7 @@ public boolean equals(final java.lang.Object obj) {
 
       if (!getSentenceMatchesList()
           .equals(other.getSentenceMatchesList())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -12104,7 +11904,7 @@ public int hashCode() {
         hash = (37 * hash) + SENTENCEMATCHES_FIELD_NUMBER;
         hash = (53 * hash) + getSentenceMatchesList().hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -12153,11 +11953,13 @@ public static org.languagetool.rules.ml.MLServerProto.MatchResponse parseFrom(
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.MatchResponse parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.MatchResponse parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -12221,29 +12023,25 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.MatchResponse.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-          getSentenceMatchesFieldBuilder();
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         if (sentenceMatchesBuilder_ == null) {
           sentenceMatches_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
+          sentenceMatches_ = null;
           sentenceMatchesBuilder_.clear();
         }
+        bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
 
@@ -12270,7 +12068,13 @@ public org.languagetool.rules.ml.MLServerProto.MatchResponse build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.MatchResponse buildPartial() {
         org.languagetool.rules.ml.MLServerProto.MatchResponse result = new org.languagetool.rules.ml.MLServerProto.MatchResponse(this);
-        int from_bitField0_ = bitField0_;
+        buildPartialRepeatedFields(result);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.MatchResponse result) {
         if (sentenceMatchesBuilder_ == null) {
           if (((bitField0_ & 0x00000001) != 0)) {
             sentenceMatches_ = java.util.Collections.unmodifiableList(sentenceMatches_);
@@ -12280,8 +12084,10 @@ public org.languagetool.rules.ml.MLServerProto.MatchResponse buildPartial() {
         } else {
           result.sentenceMatches_ = sentenceMatchesBuilder_.build();
         }
-        onBuilt();
-        return result;
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.MatchResponse result) {
+        int from_bitField0_ = bitField0_;
       }
 
       @java.lang.Override
@@ -12354,7 +12160,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.MatchResponse o
             }
           }
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -12369,17 +12175,43 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.MatchResponse parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                org.languagetool.rules.ml.MLServerProto.MatchList m =
+                    input.readMessage(
+                        org.languagetool.rules.ml.MLServerProto.MatchList.parser(),
+                        extensionRegistry);
+                if (sentenceMatchesBuilder_ == null) {
+                  ensureSentenceMatchesIsMutable();
+                  sentenceMatches_.add(m);
+                } else {
+                  sentenceMatchesBuilder_.addMessage(m);
+                }
+                break;
+              } // case 10
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.MatchResponse) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
@@ -12728,7 +12560,18 @@ public MatchResponse parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new MatchResponse(input, extensionRegistry);
+        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();
       }
     };
 
@@ -12819,61 +12662,6 @@ protected java.lang.Object newInstance(
       return new MatchList();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private MatchList(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                matches_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              matches_.add(
-                  input.readMessage(org.languagetool.rules.ml.MLServerProto.Match.parser(), extensionRegistry));
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          matches_ = java.util.Collections.unmodifiableList(matches_);
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_MatchList_descriptor;
@@ -12888,6 +12676,7 @@ private MatchList(
     }
 
     public static final int MATCHES_FIELD_NUMBER = 1;
+    @SuppressWarnings("serial")
     private java.util.List matches_;
     /**
      * 
@@ -12964,7 +12753,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       for (int i = 0; i < matches_.size(); i++) {
         output.writeMessage(1, matches_.get(i));
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -12977,7 +12766,7 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(1, matches_.get(i));
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -12994,7 +12783,7 @@ public boolean equals(final java.lang.Object obj) {
 
       if (!getMatchesList()
           .equals(other.getMatchesList())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -13009,7 +12798,7 @@ public int hashCode() {
         hash = (37 * hash) + MATCHES_FIELD_NUMBER;
         hash = (53 * hash) + getMatchesList().hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -13058,11 +12847,13 @@ public static org.languagetool.rules.ml.MLServerProto.MatchList parseFrom(
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.MatchList parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.MatchList parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -13126,29 +12917,25 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.MatchList.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-          getMatchesFieldBuilder();
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         if (matchesBuilder_ == null) {
           matches_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000001);
         } else {
+          matches_ = null;
           matchesBuilder_.clear();
         }
+        bitField0_ = (bitField0_ & ~0x00000001);
         return this;
       }
 
@@ -13175,7 +12962,13 @@ public org.languagetool.rules.ml.MLServerProto.MatchList build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.MatchList buildPartial() {
         org.languagetool.rules.ml.MLServerProto.MatchList result = new org.languagetool.rules.ml.MLServerProto.MatchList(this);
-        int from_bitField0_ = bitField0_;
+        buildPartialRepeatedFields(result);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.MatchList result) {
         if (matchesBuilder_ == null) {
           if (((bitField0_ & 0x00000001) != 0)) {
             matches_ = java.util.Collections.unmodifiableList(matches_);
@@ -13185,8 +12978,10 @@ public org.languagetool.rules.ml.MLServerProto.MatchList buildPartial() {
         } else {
           result.matches_ = matchesBuilder_.build();
         }
-        onBuilt();
-        return result;
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.MatchList result) {
+        int from_bitField0_ = bitField0_;
       }
 
       @java.lang.Override
@@ -13259,7 +13054,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.MatchList other
             }
           }
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -13274,17 +13069,43 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.MatchList parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                org.languagetool.rules.ml.MLServerProto.Match m =
+                    input.readMessage(
+                        org.languagetool.rules.ml.MLServerProto.Match.parser(),
+                        extensionRegistry);
+                if (matchesBuilder_ == null) {
+                  ensureMatchesIsMutable();
+                  matches_.add(m);
+                } else {
+                  matchesBuilder_.addMessage(m);
+                }
+                break;
+              } // case 10
+              default: {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+            } // switch (tag)
+          } // while (!done)
         } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.MatchList) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
@@ -13633,7 +13454,18 @@ public MatchList parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new MatchList(input, extensionRegistry);
+        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();
       }
     };
 
@@ -13939,7 +13771,8 @@ private Match(com.google.protobuf.GeneratedMessageV3.Builder builder) {
     private Match() {
       id_ = "";
       subId_ = "";
-      suggestions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      suggestions_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
       ruleDescription_ = "";
       matchDescription_ = "";
       matchShortDescription_ = "";
@@ -13955,148 +13788,6 @@ protected java.lang.Object newInstance(
       return new Match();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private Match(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 8: {
-
-              offset_ = input.readUInt32();
-              break;
-            }
-            case 16: {
-
-              length_ = input.readUInt32();
-              break;
-            }
-            case 26: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              id_ = s;
-              break;
-            }
-            case 34: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              subId_ = s;
-              break;
-            }
-            case 42: {
-              java.lang.String s = input.readStringRequireUtf8();
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                suggestions_ = new com.google.protobuf.LazyStringArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              suggestions_.add(s);
-              break;
-            }
-            case 50: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              ruleDescription_ = s;
-              break;
-            }
-            case 58: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              matchDescription_ = s;
-              break;
-            }
-            case 66: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              matchShortDescription_ = s;
-              break;
-            }
-            case 74: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              url_ = s;
-              break;
-            }
-            case 82: {
-              if (!((mutable_bitField0_ & 0x00000002) != 0)) {
-                suggestedReplacements_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000002;
-              }
-              suggestedReplacements_.add(
-                  input.readMessage(org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.parser(), extensionRegistry));
-              break;
-            }
-            case 88: {
-
-              autoCorrect_ = input.readBool();
-              break;
-            }
-            case 96: {
-              int rawValue = input.readEnum();
-
-              type_ = rawValue;
-              break;
-            }
-            case 104: {
-
-              contextForSureMatch_ = input.readSInt32();
-              break;
-            }
-            case 114: {
-              org.languagetool.rules.ml.MLServerProto.Rule.Builder subBuilder = null;
-              if (rule_ != null) {
-                subBuilder = rule_.toBuilder();
-              }
-              rule_ = input.readMessage(org.languagetool.rules.ml.MLServerProto.Rule.parser(), extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(rule_);
-                rule_ = subBuilder.buildPartial();
-              }
-
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          suggestions_ = suggestions_.getUnmodifiableView();
-        }
-        if (((mutable_bitField0_ & 0x00000002) != 0)) {
-          suggestedReplacements_ = java.util.Collections.unmodifiableList(suggestedReplacements_);
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_Match_descriptor;
@@ -14251,8 +13942,9 @@ private MatchType(int value) {
       // @@protoc_insertion_point(enum_scope:lt_ml_server.Match.MatchType)
     }
 
+    private int bitField0_;
     public static final int OFFSET_FIELD_NUMBER = 1;
-    private int offset_;
+    private int offset_ = 0;
     /**
      * 
      * start position in the sentence (i.e. not relative to whole text)
@@ -14267,7 +13959,7 @@ public int getOffset() {
     }
 
     public static final int LENGTH_FIELD_NUMBER = 2;
-    private int length_;
+    private int length_ = 0;
     /**
      * 
      * length of matched area; >0
@@ -14282,7 +13974,8 @@ public int getLength() {
     }
 
     public static final int ID_FIELD_NUMBER = 3;
-    private volatile java.lang.Object id_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object id_ = "";
     /**
      * 
      * prefix for rule ids; should use a common value for one model/server
@@ -14328,7 +14021,8 @@ public java.lang.String getId() {
     }
 
     public static final int SUB_ID_FIELD_NUMBER = 4;
-    private volatile java.lang.Object subId_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object subId_ = "";
     /**
      * 
      * more specific suffix for rule ids; i.e. one model/server can return multiple values to distinguish between mach types
@@ -14374,7 +14068,9 @@ public java.lang.String getSubId() {
     }
 
     public static final int SUGGESTIONS_FIELD_NUMBER = 5;
-    private com.google.protobuf.LazyStringList suggestions_;
+    @SuppressWarnings("serial")
+    private com.google.protobuf.LazyStringArrayList suggestions_ =
+        com.google.protobuf.LazyStringArrayList.emptyList();
     /**
      * 
      * legacy; use suggestedReplacements
@@ -14425,7 +14121,8 @@ public java.lang.String getSuggestions(int index) {
     }
 
     public static final int RULEDESCRIPTION_FIELD_NUMBER = 6;
-    private volatile java.lang.Object ruleDescription_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object ruleDescription_ = "";
     /**
      * 
      * added later, optional (can be substituted by Java)
@@ -14471,7 +14168,8 @@ public java.lang.String getRuleDescription() {
     }
 
     public static final int MATCHDESCRIPTION_FIELD_NUMBER = 7;
-    private volatile java.lang.Object matchDescription_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object matchDescription_ = "";
     /**
      * 
      * description of the match; displayed in e.g. the add-on pop-up
@@ -14517,7 +14215,8 @@ public java.lang.String getMatchDescription() {
     }
 
     public static final int MATCHSHORTDESCRIPTION_FIELD_NUMBER = 8;
-    private volatile java.lang.Object matchShortDescription_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object matchShortDescription_ = "";
     /**
      * 
      * shortened description of the match; displayed in e.g. LibreOffice context menu
@@ -14563,7 +14262,8 @@ public java.lang.String getMatchShortDescription() {
     }
 
     public static final int URL_FIELD_NUMBER = 9;
-    private volatile java.lang.Object url_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object url_ = "";
     /**
      * 
      * to show a link, e.g. with further explanations for this error
@@ -14609,6 +14309,7 @@ public java.lang.String getUrl() {
     }
 
     public static final int SUGGESTEDREPLACEMENTS_FIELD_NUMBER = 10;
+    @SuppressWarnings("serial")
     private java.util.List suggestedReplacements_;
     /**
      * 
@@ -14669,7 +14370,7 @@ public org.languagetool.rules.ml.MLServerProto.SuggestedReplacementOrBuilder get
     }
 
     public static final int AUTOCORRECT_FIELD_NUMBER = 11;
-    private boolean autoCorrect_;
+    private boolean autoCorrect_ = false;
     /**
      * 
      * is this correction eligible for auto-correction?
@@ -14684,7 +14385,7 @@ public boolean getAutoCorrect() {
     }
 
     public static final int TYPE_FIELD_NUMBER = 12;
-    private int type_;
+    private int type_ = 0;
     /**
      * .lt_ml_server.Match.MatchType type = 12;
      * @return The enum numeric value on the wire for type.
@@ -14697,13 +14398,12 @@ public boolean getAutoCorrect() {
      * @return The type.
      */
     @java.lang.Override public org.languagetool.rules.ml.MLServerProto.Match.MatchType getType() {
-      @SuppressWarnings("deprecation")
-      org.languagetool.rules.ml.MLServerProto.Match.MatchType result = org.languagetool.rules.ml.MLServerProto.Match.MatchType.valueOf(type_);
+      org.languagetool.rules.ml.MLServerProto.Match.MatchType result = org.languagetool.rules.ml.MLServerProto.Match.MatchType.forNumber(type_);
       return result == null ? org.languagetool.rules.ml.MLServerProto.Match.MatchType.UNRECOGNIZED : result;
     }
 
     public static final int CONTEXTFORSUREMATCH_FIELD_NUMBER = 13;
-    private int contextForSureMatch_;
+    private int contextForSureMatch_ = 0;
     /**
      * sint32 contextForSureMatch = 13;
      * @return The contextForSureMatch.
@@ -14721,7 +14421,7 @@ public int getContextForSureMatch() {
      */
     @java.lang.Override
     public boolean hasRule() {
-      return rule_ != null;
+      return ((bitField0_ & 0x00000001) != 0);
     }
     /**
      * .lt_ml_server.Rule rule = 14;
@@ -14736,7 +14436,7 @@ public org.languagetool.rules.ml.MLServerProto.Rule getRule() {
      */
     @java.lang.Override
     public org.languagetool.rules.ml.MLServerProto.RuleOrBuilder getRuleOrBuilder() {
-      return getRule();
+      return rule_ == null ? org.languagetool.rules.ml.MLServerProto.Rule.getDefaultInstance() : rule_;
     }
 
     private byte memoizedIsInitialized = -1;
@@ -14759,25 +14459,25 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (length_ != 0) {
         output.writeUInt32(2, length_);
       }
-      if (!getIdBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 3, id_);
       }
-      if (!getSubIdBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subId_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 4, subId_);
       }
       for (int i = 0; i < suggestions_.size(); i++) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 5, suggestions_.getRaw(i));
       }
-      if (!getRuleDescriptionBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleDescription_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ruleDescription_);
       }
-      if (!getMatchDescriptionBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchDescription_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 7, matchDescription_);
       }
-      if (!getMatchShortDescriptionBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchShortDescription_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 8, matchShortDescription_);
       }
-      if (!getUrlBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 9, url_);
       }
       for (int i = 0; i < suggestedReplacements_.size(); i++) {
@@ -14792,10 +14492,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       if (contextForSureMatch_ != 0) {
         output.writeSInt32(13, contextForSureMatch_);
       }
-      if (rule_ != null) {
+      if (((bitField0_ & 0x00000001) != 0)) {
         output.writeMessage(14, getRule());
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -14812,10 +14512,10 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeUInt32Size(2, length_);
       }
-      if (!getIdBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, id_);
       }
-      if (!getSubIdBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(subId_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, subId_);
       }
       {
@@ -14826,16 +14526,16 @@ public int getSerializedSize() {
         size += dataSize;
         size += 1 * getSuggestionsList().size();
       }
-      if (!getRuleDescriptionBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ruleDescription_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, ruleDescription_);
       }
-      if (!getMatchDescriptionBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchDescription_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, matchDescription_);
       }
-      if (!getMatchShortDescriptionBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(matchShortDescription_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, matchShortDescription_);
       }
-      if (!getUrlBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, url_);
       }
       for (int i = 0; i < suggestedReplacements_.size(); i++) {
@@ -14854,11 +14554,11 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeSInt32Size(13, contextForSureMatch_);
       }
-      if (rule_ != null) {
+      if (((bitField0_ & 0x00000001) != 0)) {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(14, getRule());
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -14903,7 +14603,7 @@ public boolean equals(final java.lang.Object obj) {
         if (!getRule()
             .equals(other.getRule())) return false;
       }
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -14949,7 +14649,7 @@ public int hashCode() {
         hash = (37 * hash) + RULE_FIELD_NUMBER;
         hash = (53 * hash) + getRule().hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -14998,11 +14698,13 @@ public static org.languagetool.rules.ml.MLServerProto.Match parseFrom(
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.Match parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.Match parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -15078,45 +14780,36 @@ private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessageV3
                 .alwaysUseFieldBuilders) {
           getSuggestedReplacementsFieldBuilder();
+          getRuleFieldBuilder();
         }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         offset_ = 0;
-
         length_ = 0;
-
         id_ = "";
-
         subId_ = "";
-
-        suggestions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
+        suggestions_ =
+            com.google.protobuf.LazyStringArrayList.emptyList();
         ruleDescription_ = "";
-
         matchDescription_ = "";
-
         matchShortDescription_ = "";
-
         url_ = "";
-
         if (suggestedReplacementsBuilder_ == null) {
           suggestedReplacements_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000002);
         } else {
+          suggestedReplacements_ = null;
           suggestedReplacementsBuilder_.clear();
         }
+        bitField0_ = (bitField0_ & ~0x00000200);
         autoCorrect_ = false;
-
         type_ = 0;
-
         contextForSureMatch_ = 0;
-
-        if (ruleBuilder_ == null) {
-          rule_ = null;
-        } else {
-          rule_ = null;
+        rule_ = null;
+        if (ruleBuilder_ != null) {
+          ruleBuilder_.dispose();
           ruleBuilder_ = null;
         }
         return this;
@@ -15145,39 +14838,71 @@ public org.languagetool.rules.ml.MLServerProto.Match build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.Match buildPartial() {
         org.languagetool.rules.ml.MLServerProto.Match result = new org.languagetool.rules.ml.MLServerProto.Match(this);
-        int from_bitField0_ = bitField0_;
-        result.offset_ = offset_;
-        result.length_ = length_;
-        result.id_ = id_;
-        result.subId_ = subId_;
-        if (((bitField0_ & 0x00000001) != 0)) {
-          suggestions_ = suggestions_.getUnmodifiableView();
-          bitField0_ = (bitField0_ & ~0x00000001);
-        }
-        result.suggestions_ = suggestions_;
-        result.ruleDescription_ = ruleDescription_;
-        result.matchDescription_ = matchDescription_;
-        result.matchShortDescription_ = matchShortDescription_;
-        result.url_ = url_;
+        buildPartialRepeatedFields(result);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.Match result) {
         if (suggestedReplacementsBuilder_ == null) {
-          if (((bitField0_ & 0x00000002) != 0)) {
+          if (((bitField0_ & 0x00000200) != 0)) {
             suggestedReplacements_ = java.util.Collections.unmodifiableList(suggestedReplacements_);
-            bitField0_ = (bitField0_ & ~0x00000002);
+            bitField0_ = (bitField0_ & ~0x00000200);
           }
           result.suggestedReplacements_ = suggestedReplacements_;
         } else {
           result.suggestedReplacements_ = suggestedReplacementsBuilder_.build();
         }
-        result.autoCorrect_ = autoCorrect_;
-        result.type_ = type_;
-        result.contextForSureMatch_ = contextForSureMatch_;
-        if (ruleBuilder_ == null) {
-          result.rule_ = rule_;
-        } else {
-          result.rule_ = ruleBuilder_.build();
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.Match result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          result.offset_ = offset_;
         }
-        onBuilt();
-        return result;
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.length_ = length_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
+          result.id_ = id_;
+        }
+        if (((from_bitField0_ & 0x00000008) != 0)) {
+          result.subId_ = subId_;
+        }
+        if (((from_bitField0_ & 0x00000010) != 0)) {
+          suggestions_.makeImmutable();
+          result.suggestions_ = suggestions_;
+        }
+        if (((from_bitField0_ & 0x00000020) != 0)) {
+          result.ruleDescription_ = ruleDescription_;
+        }
+        if (((from_bitField0_ & 0x00000040) != 0)) {
+          result.matchDescription_ = matchDescription_;
+        }
+        if (((from_bitField0_ & 0x00000080) != 0)) {
+          result.matchShortDescription_ = matchShortDescription_;
+        }
+        if (((from_bitField0_ & 0x00000100) != 0)) {
+          result.url_ = url_;
+        }
+        if (((from_bitField0_ & 0x00000400) != 0)) {
+          result.autoCorrect_ = autoCorrect_;
+        }
+        if (((from_bitField0_ & 0x00000800) != 0)) {
+          result.type_ = type_;
+        }
+        if (((from_bitField0_ & 0x00001000) != 0)) {
+          result.contextForSureMatch_ = contextForSureMatch_;
+        }
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00002000) != 0)) {
+          result.rule_ = ruleBuilder_ == null
+              ? rule_
+              : ruleBuilder_.build();
+          to_bitField0_ |= 0x00000001;
+        }
+        result.bitField0_ |= to_bitField0_;
       }
 
       @java.lang.Override
@@ -15232,16 +14957,18 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.Match other) {
         }
         if (!other.getId().isEmpty()) {
           id_ = other.id_;
+          bitField0_ |= 0x00000004;
           onChanged();
         }
         if (!other.getSubId().isEmpty()) {
           subId_ = other.subId_;
+          bitField0_ |= 0x00000008;
           onChanged();
         }
         if (!other.suggestions_.isEmpty()) {
           if (suggestions_.isEmpty()) {
             suggestions_ = other.suggestions_;
-            bitField0_ = (bitField0_ & ~0x00000001);
+            bitField0_ |= 0x00000010;
           } else {
             ensureSuggestionsIsMutable();
             suggestions_.addAll(other.suggestions_);
@@ -15250,25 +14977,29 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.Match other) {
         }
         if (!other.getRuleDescription().isEmpty()) {
           ruleDescription_ = other.ruleDescription_;
+          bitField0_ |= 0x00000020;
           onChanged();
         }
         if (!other.getMatchDescription().isEmpty()) {
           matchDescription_ = other.matchDescription_;
+          bitField0_ |= 0x00000040;
           onChanged();
         }
         if (!other.getMatchShortDescription().isEmpty()) {
           matchShortDescription_ = other.matchShortDescription_;
+          bitField0_ |= 0x00000080;
           onChanged();
         }
         if (!other.getUrl().isEmpty()) {
           url_ = other.url_;
+          bitField0_ |= 0x00000100;
           onChanged();
         }
         if (suggestedReplacementsBuilder_ == null) {
           if (!other.suggestedReplacements_.isEmpty()) {
             if (suggestedReplacements_.isEmpty()) {
               suggestedReplacements_ = other.suggestedReplacements_;
-              bitField0_ = (bitField0_ & ~0x00000002);
+              bitField0_ = (bitField0_ & ~0x00000200);
             } else {
               ensureSuggestedReplacementsIsMutable();
               suggestedReplacements_.addAll(other.suggestedReplacements_);
@@ -15281,7 +15012,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.Match other) {
               suggestedReplacementsBuilder_.dispose();
               suggestedReplacementsBuilder_ = null;
               suggestedReplacements_ = other.suggestedReplacements_;
-              bitField0_ = (bitField0_ & ~0x00000002);
+              bitField0_ = (bitField0_ & ~0x00000200);
               suggestedReplacementsBuilder_ = 
                 com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                    getSuggestedReplacementsFieldBuilder() : null;
@@ -15302,7 +15033,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.Match other) {
         if (other.hasRule()) {
           mergeRule(other.getRule());
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -15317,17 +15048,111 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.Match parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 8: {
+                offset_ = input.readUInt32();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 8
+              case 16: {
+                length_ = input.readUInt32();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 16
+              case 26: {
+                id_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 26
+              case 34: {
+                subId_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000008;
+                break;
+              } // case 34
+              case 42: {
+                java.lang.String s = input.readStringRequireUtf8();
+                ensureSuggestionsIsMutable();
+                suggestions_.add(s);
+                break;
+              } // case 42
+              case 50: {
+                ruleDescription_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000020;
+                break;
+              } // case 50
+              case 58: {
+                matchDescription_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000040;
+                break;
+              } // case 58
+              case 66: {
+                matchShortDescription_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000080;
+                break;
+              } // case 66
+              case 74: {
+                url_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000100;
+                break;
+              } // case 74
+              case 82: {
+                org.languagetool.rules.ml.MLServerProto.SuggestedReplacement m =
+                    input.readMessage(
+                        org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.parser(),
+                        extensionRegistry);
+                if (suggestedReplacementsBuilder_ == null) {
+                  ensureSuggestedReplacementsIsMutable();
+                  suggestedReplacements_.add(m);
+                } else {
+                  suggestedReplacementsBuilder_.addMessage(m);
+                }
+                break;
+              } // case 82
+              case 88: {
+                autoCorrect_ = input.readBool();
+                bitField0_ |= 0x00000400;
+                break;
+              } // case 88
+              case 96: {
+                type_ = input.readEnum();
+                bitField0_ |= 0x00000800;
+                break;
+              } // case 96
+              case 104: {
+                contextForSureMatch_ = input.readSInt32();
+                bitField0_ |= 0x00001000;
+                break;
+              } // case 104
+              case 114: {
+                input.readMessage(
+                    getRuleFieldBuilder().getBuilder(),
+                    extensionRegistry);
+                bitField0_ |= 0x00002000;
+                break;
+              } // case 114
+              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) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.Match) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
@@ -15355,8 +15180,9 @@ public int getOffset() {
        * @return This builder for chaining.
        */
       public Builder setOffset(int value) {
-        
+
         offset_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -15369,7 +15195,7 @@ public Builder setOffset(int value) {
        * @return This builder for chaining.
        */
       public Builder clearOffset() {
-        
+        bitField0_ = (bitField0_ & ~0x00000001);
         offset_ = 0;
         onChanged();
         return this;
@@ -15398,8 +15224,9 @@ public int getLength() {
        * @return This builder for chaining.
        */
       public Builder setLength(int value) {
-        
+
         length_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -15412,7 +15239,7 @@ public Builder setLength(int value) {
        * @return This builder for chaining.
        */
       public Builder clearLength() {
-        
+        bitField0_ = (bitField0_ & ~0x00000002);
         length_ = 0;
         onChanged();
         return this;
@@ -15471,11 +15298,9 @@ public java.lang.String getId() {
        */
       public Builder setId(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         id_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -15488,8 +15313,8 @@ public Builder setId(
        * @return This builder for chaining.
        */
       public Builder clearId() {
-        
         id_ = getDefaultInstance().getId();
+        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -15504,12 +15329,10 @@ public Builder clearId() {
        */
       public Builder setIdBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         id_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -15567,11 +15390,9 @@ public java.lang.String getSubId() {
        */
       public Builder setSubId(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         subId_ = value;
+        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -15584,8 +15405,8 @@ public Builder setSubId(
        * @return This builder for chaining.
        */
       public Builder clearSubId() {
-        
         subId_ = getDefaultInstance().getSubId();
+        bitField0_ = (bitField0_ & ~0x00000008);
         onChanged();
         return this;
       }
@@ -15600,22 +15421,21 @@ public Builder clearSubId() {
        */
       public Builder setSubIdBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         subId_ = value;
+        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
 
-      private com.google.protobuf.LazyStringList suggestions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
+      private com.google.protobuf.LazyStringArrayList suggestions_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
       private void ensureSuggestionsIsMutable() {
-        if (!((bitField0_ & 0x00000001) != 0)) {
+        if (!suggestions_.isModifiable()) {
           suggestions_ = new com.google.protobuf.LazyStringArrayList(suggestions_);
-          bitField0_ |= 0x00000001;
-         }
+        }
+        bitField0_ |= 0x00000010;
       }
       /**
        * 
@@ -15627,7 +15447,8 @@ private void ensureSuggestionsIsMutable() {
        */
       public com.google.protobuf.ProtocolStringList
           getSuggestionsList() {
-        return suggestions_.getUnmodifiableView();
+        suggestions_.makeImmutable();
+        return suggestions_;
       }
       /**
        * 
@@ -15677,11 +15498,10 @@ public java.lang.String getSuggestions(int index) {
        */
       public Builder setSuggestions(
           int index, java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureSuggestionsIsMutable();
+        if (value == null) { throw new NullPointerException(); }
+        ensureSuggestionsIsMutable();
         suggestions_.set(index, value);
+        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -15696,11 +15516,10 @@ public Builder setSuggestions(
        */
       public Builder addSuggestions(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  ensureSuggestionsIsMutable();
+        if (value == null) { throw new NullPointerException(); }
+        ensureSuggestionsIsMutable();
         suggestions_.add(value);
+        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -15718,6 +15537,7 @@ public Builder addAllSuggestions(
         ensureSuggestionsIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, suggestions_);
+        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -15730,8 +15550,9 @@ public Builder addAllSuggestions(
        * @return This builder for chaining.
        */
       public Builder clearSuggestions() {
-        suggestions_ = com.google.protobuf.LazyStringArrayList.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00000001);
+        suggestions_ =
+          com.google.protobuf.LazyStringArrayList.emptyList();
+        bitField0_ = (bitField0_ & ~0x00000010);;
         onChanged();
         return this;
       }
@@ -15746,12 +15567,11 @@ public Builder clearSuggestions() {
        */
       public Builder addSuggestionsBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         ensureSuggestionsIsMutable();
         suggestions_.add(value);
+        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -15809,11 +15629,9 @@ public java.lang.String getRuleDescription() {
        */
       public Builder setRuleDescription(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         ruleDescription_ = value;
+        bitField0_ |= 0x00000020;
         onChanged();
         return this;
       }
@@ -15826,8 +15644,8 @@ public Builder setRuleDescription(
        * @return This builder for chaining.
        */
       public Builder clearRuleDescription() {
-        
         ruleDescription_ = getDefaultInstance().getRuleDescription();
+        bitField0_ = (bitField0_ & ~0x00000020);
         onChanged();
         return this;
       }
@@ -15842,12 +15660,10 @@ public Builder clearRuleDescription() {
        */
       public Builder setRuleDescriptionBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         ruleDescription_ = value;
+        bitField0_ |= 0x00000020;
         onChanged();
         return this;
       }
@@ -15905,11 +15721,9 @@ public java.lang.String getMatchDescription() {
        */
       public Builder setMatchDescription(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         matchDescription_ = value;
+        bitField0_ |= 0x00000040;
         onChanged();
         return this;
       }
@@ -15922,8 +15736,8 @@ public Builder setMatchDescription(
        * @return This builder for chaining.
        */
       public Builder clearMatchDescription() {
-        
         matchDescription_ = getDefaultInstance().getMatchDescription();
+        bitField0_ = (bitField0_ & ~0x00000040);
         onChanged();
         return this;
       }
@@ -15938,12 +15752,10 @@ public Builder clearMatchDescription() {
        */
       public Builder setMatchDescriptionBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         matchDescription_ = value;
+        bitField0_ |= 0x00000040;
         onChanged();
         return this;
       }
@@ -16001,11 +15813,9 @@ public java.lang.String getMatchShortDescription() {
        */
       public Builder setMatchShortDescription(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         matchShortDescription_ = value;
+        bitField0_ |= 0x00000080;
         onChanged();
         return this;
       }
@@ -16018,8 +15828,8 @@ public Builder setMatchShortDescription(
        * @return This builder for chaining.
        */
       public Builder clearMatchShortDescription() {
-        
         matchShortDescription_ = getDefaultInstance().getMatchShortDescription();
+        bitField0_ = (bitField0_ & ~0x00000080);
         onChanged();
         return this;
       }
@@ -16034,12 +15844,10 @@ public Builder clearMatchShortDescription() {
        */
       public Builder setMatchShortDescriptionBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         matchShortDescription_ = value;
+        bitField0_ |= 0x00000080;
         onChanged();
         return this;
       }
@@ -16097,11 +15905,9 @@ public java.lang.String getUrl() {
        */
       public Builder setUrl(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         url_ = value;
+        bitField0_ |= 0x00000100;
         onChanged();
         return this;
       }
@@ -16114,8 +15920,8 @@ public Builder setUrl(
        * @return This builder for chaining.
        */
       public Builder clearUrl() {
-        
         url_ = getDefaultInstance().getUrl();
+        bitField0_ = (bitField0_ & ~0x00000100);
         onChanged();
         return this;
       }
@@ -16130,12 +15936,10 @@ public Builder clearUrl() {
        */
       public Builder setUrlBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         url_ = value;
+        bitField0_ |= 0x00000100;
         onChanged();
         return this;
       }
@@ -16143,9 +15947,9 @@ public Builder setUrlBytes(
       private java.util.List suggestedReplacements_ =
         java.util.Collections.emptyList();
       private void ensureSuggestedReplacementsIsMutable() {
-        if (!((bitField0_ & 0x00000002) != 0)) {
+        if (!((bitField0_ & 0x00000200) != 0)) {
           suggestedReplacements_ = new java.util.ArrayList(suggestedReplacements_);
-          bitField0_ |= 0x00000002;
+          bitField0_ |= 0x00000200;
          }
       }
 
@@ -16339,7 +16143,7 @@ public Builder addAllSuggestedReplacements(
       public Builder clearSuggestedReplacements() {
         if (suggestedReplacementsBuilder_ == null) {
           suggestedReplacements_ = java.util.Collections.emptyList();
-          bitField0_ = (bitField0_ & ~0x00000002);
+          bitField0_ = (bitField0_ & ~0x00000200);
           onChanged();
         } else {
           suggestedReplacementsBuilder_.clear();
@@ -16444,7 +16248,7 @@ public org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.Builder addS
           suggestedReplacementsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
               org.languagetool.rules.ml.MLServerProto.SuggestedReplacement, org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.Builder, org.languagetool.rules.ml.MLServerProto.SuggestedReplacementOrBuilder>(
                   suggestedReplacements_,
-                  ((bitField0_ & 0x00000002) != 0),
+                  ((bitField0_ & 0x00000200) != 0),
                   getParentForChildren(),
                   isClean());
           suggestedReplacements_ = null;
@@ -16475,8 +16279,9 @@ public boolean getAutoCorrect() {
        * @return This builder for chaining.
        */
       public Builder setAutoCorrect(boolean value) {
-        
+
         autoCorrect_ = value;
+        bitField0_ |= 0x00000400;
         onChanged();
         return this;
       }
@@ -16489,7 +16294,7 @@ public Builder setAutoCorrect(boolean value) {
        * @return This builder for chaining.
        */
       public Builder clearAutoCorrect() {
-        
+        bitField0_ = (bitField0_ & ~0x00000400);
         autoCorrect_ = false;
         onChanged();
         return this;
@@ -16509,8 +16314,8 @@ public Builder clearAutoCorrect() {
        * @return This builder for chaining.
        */
       public Builder setTypeValue(int value) {
-        
         type_ = value;
+        bitField0_ |= 0x00000800;
         onChanged();
         return this;
       }
@@ -16520,8 +16325,7 @@ public Builder setTypeValue(int value) {
        */
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.Match.MatchType getType() {
-        @SuppressWarnings("deprecation")
-        org.languagetool.rules.ml.MLServerProto.Match.MatchType result = org.languagetool.rules.ml.MLServerProto.Match.MatchType.valueOf(type_);
+        org.languagetool.rules.ml.MLServerProto.Match.MatchType result = org.languagetool.rules.ml.MLServerProto.Match.MatchType.forNumber(type_);
         return result == null ? org.languagetool.rules.ml.MLServerProto.Match.MatchType.UNRECOGNIZED : result;
       }
       /**
@@ -16533,7 +16337,7 @@ public Builder setType(org.languagetool.rules.ml.MLServerProto.Match.MatchType v
         if (value == null) {
           throw new NullPointerException();
         }
-        
+        bitField0_ |= 0x00000800;
         type_ = value.getNumber();
         onChanged();
         return this;
@@ -16543,7 +16347,7 @@ public Builder setType(org.languagetool.rules.ml.MLServerProto.Match.MatchType v
        * @return This builder for chaining.
        */
       public Builder clearType() {
-        
+        bitField0_ = (bitField0_ & ~0x00000800);
         type_ = 0;
         onChanged();
         return this;
@@ -16564,8 +16368,9 @@ public int getContextForSureMatch() {
        * @return This builder for chaining.
        */
       public Builder setContextForSureMatch(int value) {
-        
+
         contextForSureMatch_ = value;
+        bitField0_ |= 0x00001000;
         onChanged();
         return this;
       }
@@ -16574,7 +16379,7 @@ public Builder setContextForSureMatch(int value) {
        * @return This builder for chaining.
        */
       public Builder clearContextForSureMatch() {
-        
+        bitField0_ = (bitField0_ & ~0x00001000);
         contextForSureMatch_ = 0;
         onChanged();
         return this;
@@ -16588,7 +16393,7 @@ public Builder clearContextForSureMatch() {
        * @return Whether the rule field is set.
        */
       public boolean hasRule() {
-        return ruleBuilder_ != null || rule_ != null;
+        return ((bitField0_ & 0x00002000) != 0);
       }
       /**
        * .lt_ml_server.Rule rule = 14;
@@ -16610,11 +16415,11 @@ public Builder setRule(org.languagetool.rules.ml.MLServerProto.Rule value) {
             throw new NullPointerException();
           }
           rule_ = value;
-          onChanged();
         } else {
           ruleBuilder_.setMessage(value);
         }
-
+        bitField0_ |= 0x00002000;
+        onChanged();
         return this;
       }
       /**
@@ -16624,11 +16429,11 @@ public Builder setRule(
           org.languagetool.rules.ml.MLServerProto.Rule.Builder builderForValue) {
         if (ruleBuilder_ == null) {
           rule_ = builderForValue.build();
-          onChanged();
         } else {
           ruleBuilder_.setMessage(builderForValue.build());
         }
-
+        bitField0_ |= 0x00002000;
+        onChanged();
         return this;
       }
       /**
@@ -16636,38 +16441,40 @@ public Builder setRule(
        */
       public Builder mergeRule(org.languagetool.rules.ml.MLServerProto.Rule value) {
         if (ruleBuilder_ == null) {
-          if (rule_ != null) {
-            rule_ =
-              org.languagetool.rules.ml.MLServerProto.Rule.newBuilder(rule_).mergeFrom(value).buildPartial();
+          if (((bitField0_ & 0x00002000) != 0) &&
+            rule_ != null &&
+            rule_ != org.languagetool.rules.ml.MLServerProto.Rule.getDefaultInstance()) {
+            getRuleBuilder().mergeFrom(value);
           } else {
             rule_ = value;
           }
-          onChanged();
         } else {
           ruleBuilder_.mergeFrom(value);
         }
-
+        if (rule_ != null) {
+          bitField0_ |= 0x00002000;
+          onChanged();
+        }
         return this;
       }
       /**
        * .lt_ml_server.Rule rule = 14;
        */
       public Builder clearRule() {
-        if (ruleBuilder_ == null) {
-          rule_ = null;
-          onChanged();
-        } else {
-          rule_ = null;
+        bitField0_ = (bitField0_ & ~0x00002000);
+        rule_ = null;
+        if (ruleBuilder_ != null) {
+          ruleBuilder_.dispose();
           ruleBuilder_ = null;
         }
-
+        onChanged();
         return this;
       }
       /**
        * .lt_ml_server.Rule rule = 14;
        */
       public org.languagetool.rules.ml.MLServerProto.Rule.Builder getRuleBuilder() {
-        
+        bitField0_ |= 0x00002000;
         onChanged();
         return getRuleFieldBuilder().getBuilder();
       }
@@ -16731,7 +16538,18 @@ public Match parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new Match(input, extensionRegistry);
+        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();
       }
     };
 
@@ -16876,110 +16694,6 @@ protected java.lang.Object newInstance(
       return new Rule();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private Rule(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      int mutable_bitField0_ = 0;
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              sourceFile_ = s;
-              break;
-            }
-            case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              issueType_ = s;
-              break;
-            }
-            case 24: {
-
-              tempOff_ = input.readBool();
-              break;
-            }
-            case 34: {
-              org.languagetool.rules.ml.MLServerProto.RuleCategory.Builder subBuilder = null;
-              if (category_ != null) {
-                subBuilder = category_.toBuilder();
-              }
-              category_ = input.readMessage(org.languagetool.rules.ml.MLServerProto.RuleCategory.parser(), extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(category_);
-                category_ = subBuilder.buildPartial();
-              }
-
-              break;
-            }
-            case 40: {
-
-              isPremium_ = input.readBool();
-              break;
-            }
-            case 48: {
-              int rawValue = input.readEnum();
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                tags_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              tags_.add(rawValue);
-              break;
-            }
-            case 50: {
-              int length = input.readRawVarint32();
-              int oldLimit = input.pushLimit(length);
-              while(input.getBytesUntilLimit() > 0) {
-                int rawValue = input.readEnum();
-                if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                  tags_ = new java.util.ArrayList();
-                  mutable_bitField0_ |= 0x00000001;
-                }
-                tags_.add(rawValue);
-              }
-              input.popLimit(oldLimit);
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        if (((mutable_bitField0_ & 0x00000001) != 0)) {
-          tags_ = java.util.Collections.unmodifiableList(tags_);
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_Rule_descriptor;
@@ -17164,8 +16878,10 @@ private Tag(int value) {
       // @@protoc_insertion_point(enum_scope:lt_ml_server.Rule.Tag)
     }
 
+    private int bitField0_;
     public static final int SOURCEFILE_FIELD_NUMBER = 1;
-    private volatile java.lang.Object sourceFile_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object sourceFile_ = "";
     /**
      * 
      * id, subId, description, url already in Match
@@ -17211,7 +16927,8 @@ public java.lang.String getSourceFile() {
     }
 
     public static final int ISSUETYPE_FIELD_NUMBER = 2;
-    private volatile java.lang.Object issueType_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object issueType_ = "";
     /**
      * 
      * see http://www.w3.org/International/multilingualweb/lt/drafts/its20/its20.html#lqissue-typevalues
@@ -17257,7 +16974,7 @@ public java.lang.String getIssueType() {
     }
 
     public static final int TEMPOFF_FIELD_NUMBER = 3;
-    private boolean tempOff_;
+    private boolean tempOff_ = false;
     /**
      * bool tempOff = 3;
      * @return The tempOff.
@@ -17275,7 +16992,7 @@ public boolean getTempOff() {
      */
     @java.lang.Override
     public boolean hasCategory() {
-      return category_ != null;
+      return ((bitField0_ & 0x00000001) != 0);
     }
     /**
      * .lt_ml_server.RuleCategory category = 4;
@@ -17290,11 +17007,11 @@ public org.languagetool.rules.ml.MLServerProto.RuleCategory getCategory() {
      */
     @java.lang.Override
     public org.languagetool.rules.ml.MLServerProto.RuleCategoryOrBuilder getCategoryOrBuilder() {
-      return getCategory();
+      return category_ == null ? org.languagetool.rules.ml.MLServerProto.RuleCategory.getDefaultInstance() : category_;
     }
 
     public static final int ISPREMIUM_FIELD_NUMBER = 5;
-    private boolean isPremium_;
+    private boolean isPremium_ = false;
     /**
      * bool isPremium = 5;
      * @return The isPremium.
@@ -17305,14 +17022,14 @@ public boolean getIsPremium() {
     }
 
     public static final int TAGS_FIELD_NUMBER = 6;
+    @SuppressWarnings("serial")
     private java.util.List tags_;
     private static final com.google.protobuf.Internal.ListAdapter.Converter<
         java.lang.Integer, org.languagetool.rules.ml.MLServerProto.Rule.Tag> tags_converter_ =
             new com.google.protobuf.Internal.ListAdapter.Converter<
                 java.lang.Integer, org.languagetool.rules.ml.MLServerProto.Rule.Tag>() {
               public org.languagetool.rules.ml.MLServerProto.Rule.Tag convert(java.lang.Integer from) {
-                @SuppressWarnings("deprecation")
-                org.languagetool.rules.ml.MLServerProto.Rule.Tag result = org.languagetool.rules.ml.MLServerProto.Rule.Tag.valueOf(from);
+                org.languagetool.rules.ml.MLServerProto.Rule.Tag result = org.languagetool.rules.ml.MLServerProto.Rule.Tag.forNumber(from);
                 return result == null ? org.languagetool.rules.ml.MLServerProto.Rule.Tag.UNRECOGNIZED : result;
               }
             };
@@ -17377,16 +17094,16 @@ public final boolean isInitialized() {
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
       getSerializedSize();
-      if (!getSourceFileBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceFile_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourceFile_);
       }
-      if (!getIssueTypeBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issueType_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, issueType_);
       }
       if (tempOff_ != false) {
         output.writeBool(3, tempOff_);
       }
-      if (category_ != null) {
+      if (((bitField0_ & 0x00000001) != 0)) {
         output.writeMessage(4, getCategory());
       }
       if (isPremium_ != false) {
@@ -17399,7 +17116,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
       for (int i = 0; i < tags_.size(); i++) {
         output.writeEnumNoTag(tags_.get(i));
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -17408,17 +17125,17 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!getSourceFileBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourceFile_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourceFile_);
       }
-      if (!getIssueTypeBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(issueType_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, issueType_);
       }
       if (tempOff_ != false) {
         size += com.google.protobuf.CodedOutputStream
           .computeBoolSize(3, tempOff_);
       }
-      if (category_ != null) {
+      if (((bitField0_ & 0x00000001) != 0)) {
         size += com.google.protobuf.CodedOutputStream
           .computeMessageSize(4, getCategory());
       }
@@ -17438,7 +17155,7 @@ public int getSerializedSize() {
             .computeUInt32SizeNoTag(dataSize);
         }tagsMemoizedSerializedSize = dataSize;
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -17467,7 +17184,7 @@ public boolean equals(final java.lang.Object obj) {
       if (getIsPremium()
           != other.getIsPremium()) return false;
       if (!tags_.equals(other.tags_)) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -17496,7 +17213,7 @@ public int hashCode() {
         hash = (37 * hash) + TAGS_FIELD_NUMBER;
         hash = (53 * hash) + tags_.hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -17545,11 +17262,13 @@ public static org.languagetool.rules.ml.MLServerProto.Rule parseFrom(
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.Rule parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.Rule parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -17624,27 +17343,24 @@ private Builder(
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessageV3
                 .alwaysUseFieldBuilders) {
+          getCategoryFieldBuilder();
         }
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         sourceFile_ = "";
-
         issueType_ = "";
-
         tempOff_ = false;
-
-        if (categoryBuilder_ == null) {
-          category_ = null;
-        } else {
-          category_ = null;
+        category_ = null;
+        if (categoryBuilder_ != null) {
+          categoryBuilder_.dispose();
           categoryBuilder_ = null;
         }
         isPremium_ = false;
-
         tags_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000001);
+        bitField0_ = (bitField0_ & ~0x00000020);
         return this;
       }
 
@@ -17671,23 +17387,42 @@ public org.languagetool.rules.ml.MLServerProto.Rule build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.Rule buildPartial() {
         org.languagetool.rules.ml.MLServerProto.Rule result = new org.languagetool.rules.ml.MLServerProto.Rule(this);
-        int from_bitField0_ = bitField0_;
-        result.sourceFile_ = sourceFile_;
-        result.issueType_ = issueType_;
-        result.tempOff_ = tempOff_;
-        if (categoryBuilder_ == null) {
-          result.category_ = category_;
-        } else {
-          result.category_ = categoryBuilder_.build();
-        }
-        result.isPremium_ = isPremium_;
-        if (((bitField0_ & 0x00000001) != 0)) {
+        buildPartialRepeatedFields(result);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartialRepeatedFields(org.languagetool.rules.ml.MLServerProto.Rule result) {
+        if (((bitField0_ & 0x00000020) != 0)) {
           tags_ = java.util.Collections.unmodifiableList(tags_);
-          bitField0_ = (bitField0_ & ~0x00000001);
+          bitField0_ = (bitField0_ & ~0x00000020);
         }
         result.tags_ = tags_;
-        onBuilt();
-        return result;
+      }
+
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.Rule result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          result.sourceFile_ = sourceFile_;
+        }
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.issueType_ = issueType_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
+          result.tempOff_ = tempOff_;
+        }
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000008) != 0)) {
+          result.category_ = categoryBuilder_ == null
+              ? category_
+              : categoryBuilder_.build();
+          to_bitField0_ |= 0x00000001;
+        }
+        if (((from_bitField0_ & 0x00000010) != 0)) {
+          result.isPremium_ = isPremium_;
+        }
+        result.bitField0_ |= to_bitField0_;
       }
 
       @java.lang.Override
@@ -17736,10 +17471,12 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.Rule other) {
         if (other == org.languagetool.rules.ml.MLServerProto.Rule.getDefaultInstance()) return this;
         if (!other.getSourceFile().isEmpty()) {
           sourceFile_ = other.sourceFile_;
+          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getIssueType().isEmpty()) {
           issueType_ = other.issueType_;
+          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (other.getTempOff() != false) {
@@ -17754,14 +17491,14 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.Rule other) {
         if (!other.tags_.isEmpty()) {
           if (tags_.isEmpty()) {
             tags_ = other.tags_;
-            bitField0_ = (bitField0_ & ~0x00000001);
+            bitField0_ = (bitField0_ & ~0x00000020);
           } else {
             ensureTagsIsMutable();
             tags_.addAll(other.tags_);
           }
           onChanged();
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -17776,17 +17513,74 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.Rule parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                sourceFile_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 10
+              case 18: {
+                issueType_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 18
+              case 24: {
+                tempOff_ = input.readBool();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 24
+              case 34: {
+                input.readMessage(
+                    getCategoryFieldBuilder().getBuilder(),
+                    extensionRegistry);
+                bitField0_ |= 0x00000008;
+                break;
+              } // case 34
+              case 40: {
+                isPremium_ = input.readBool();
+                bitField0_ |= 0x00000010;
+                break;
+              } // case 40
+              case 48: {
+                int tmpRaw = input.readEnum();
+                ensureTagsIsMutable();
+                tags_.add(tmpRaw);
+                break;
+              } // case 48
+              case 50: {
+                int length = input.readRawVarint32();
+                int oldLimit = input.pushLimit(length);
+                while(input.getBytesUntilLimit() > 0) {
+                  int tmpRaw = input.readEnum();
+                  ensureTagsIsMutable();
+                  tags_.add(tmpRaw);
+                }
+                input.popLimit(oldLimit);
+                break;
+              } // case 50
+              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) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.Rule) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
@@ -17844,11 +17638,9 @@ public java.lang.String getSourceFile() {
        */
       public Builder setSourceFile(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         sourceFile_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -17861,8 +17653,8 @@ public Builder setSourceFile(
        * @return This builder for chaining.
        */
       public Builder clearSourceFile() {
-        
         sourceFile_ = getDefaultInstance().getSourceFile();
+        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -17877,12 +17669,10 @@ public Builder clearSourceFile() {
        */
       public Builder setSourceFileBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         sourceFile_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -17940,11 +17730,9 @@ public java.lang.String getIssueType() {
        */
       public Builder setIssueType(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         issueType_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -17957,8 +17745,8 @@ public Builder setIssueType(
        * @return This builder for chaining.
        */
       public Builder clearIssueType() {
-        
         issueType_ = getDefaultInstance().getIssueType();
+        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -17973,12 +17761,10 @@ public Builder clearIssueType() {
        */
       public Builder setIssueTypeBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         issueType_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -17998,8 +17784,9 @@ public boolean getTempOff() {
        * @return This builder for chaining.
        */
       public Builder setTempOff(boolean value) {
-        
+
         tempOff_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -18008,7 +17795,7 @@ public Builder setTempOff(boolean value) {
        * @return This builder for chaining.
        */
       public Builder clearTempOff() {
-        
+        bitField0_ = (bitField0_ & ~0x00000004);
         tempOff_ = false;
         onChanged();
         return this;
@@ -18022,7 +17809,7 @@ public Builder clearTempOff() {
        * @return Whether the category field is set.
        */
       public boolean hasCategory() {
-        return categoryBuilder_ != null || category_ != null;
+        return ((bitField0_ & 0x00000008) != 0);
       }
       /**
        * .lt_ml_server.RuleCategory category = 4;
@@ -18044,11 +17831,11 @@ public Builder setCategory(org.languagetool.rules.ml.MLServerProto.RuleCategory
             throw new NullPointerException();
           }
           category_ = value;
-          onChanged();
         } else {
           categoryBuilder_.setMessage(value);
         }
-
+        bitField0_ |= 0x00000008;
+        onChanged();
         return this;
       }
       /**
@@ -18058,11 +17845,11 @@ public Builder setCategory(
           org.languagetool.rules.ml.MLServerProto.RuleCategory.Builder builderForValue) {
         if (categoryBuilder_ == null) {
           category_ = builderForValue.build();
-          onChanged();
         } else {
           categoryBuilder_.setMessage(builderForValue.build());
         }
-
+        bitField0_ |= 0x00000008;
+        onChanged();
         return this;
       }
       /**
@@ -18070,38 +17857,40 @@ public Builder setCategory(
        */
       public Builder mergeCategory(org.languagetool.rules.ml.MLServerProto.RuleCategory value) {
         if (categoryBuilder_ == null) {
-          if (category_ != null) {
-            category_ =
-              org.languagetool.rules.ml.MLServerProto.RuleCategory.newBuilder(category_).mergeFrom(value).buildPartial();
+          if (((bitField0_ & 0x00000008) != 0) &&
+            category_ != null &&
+            category_ != org.languagetool.rules.ml.MLServerProto.RuleCategory.getDefaultInstance()) {
+            getCategoryBuilder().mergeFrom(value);
           } else {
             category_ = value;
           }
-          onChanged();
         } else {
           categoryBuilder_.mergeFrom(value);
         }
-
+        if (category_ != null) {
+          bitField0_ |= 0x00000008;
+          onChanged();
+        }
         return this;
       }
       /**
        * .lt_ml_server.RuleCategory category = 4;
        */
       public Builder clearCategory() {
-        if (categoryBuilder_ == null) {
-          category_ = null;
-          onChanged();
-        } else {
-          category_ = null;
+        bitField0_ = (bitField0_ & ~0x00000008);
+        category_ = null;
+        if (categoryBuilder_ != null) {
+          categoryBuilder_.dispose();
           categoryBuilder_ = null;
         }
-
+        onChanged();
         return this;
       }
       /**
        * .lt_ml_server.RuleCategory category = 4;
        */
       public org.languagetool.rules.ml.MLServerProto.RuleCategory.Builder getCategoryBuilder() {
-        
+        bitField0_ |= 0x00000008;
         onChanged();
         return getCategoryFieldBuilder().getBuilder();
       }
@@ -18148,8 +17937,9 @@ public boolean getIsPremium() {
        * @return This builder for chaining.
        */
       public Builder setIsPremium(boolean value) {
-        
+
         isPremium_ = value;
+        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -18158,7 +17948,7 @@ public Builder setIsPremium(boolean value) {
        * @return This builder for chaining.
        */
       public Builder clearIsPremium() {
-        
+        bitField0_ = (bitField0_ & ~0x00000010);
         isPremium_ = false;
         onChanged();
         return this;
@@ -18167,9 +17957,9 @@ public Builder clearIsPremium() {
       private java.util.List tags_ =
         java.util.Collections.emptyList();
       private void ensureTagsIsMutable() {
-        if (!((bitField0_ & 0x00000001) != 0)) {
+        if (!((bitField0_ & 0x00000020) != 0)) {
           tags_ = new java.util.ArrayList(tags_);
-          bitField0_ |= 0x00000001;
+          bitField0_ |= 0x00000020;
         }
       }
       /**
@@ -18245,7 +18035,7 @@ public Builder addAllTags(
        */
       public Builder clearTags() {
         tags_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000001);
+        bitField0_ = (bitField0_ & ~0x00000020);
         onChanged();
         return this;
       }
@@ -18267,8 +18057,8 @@ public int getTagsValue(int index) {
       }
       /**
        * repeated .lt_ml_server.Rule.Tag tags = 6;
-       * @param index The index of the value to return.
-       * @return The enum numeric value on the wire of tags at the given index.
+       * @param index The index to set the value at.
+       * @param value The enum numeric value on the wire for tags to set.
        * @return This builder for chaining.
        */
       public Builder setTagsValue(
@@ -18336,7 +18126,18 @@ public Rule parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new Rule(input, extensionRegistry);
+        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();
       }
     };
 
@@ -18408,60 +18209,6 @@ protected java.lang.Object newInstance(
       return new RuleCategory();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private RuleCategory(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              id_ = s;
-              break;
-            }
-            case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              name_ = s;
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_RuleCategory_descriptor;
@@ -18476,7 +18223,8 @@ private RuleCategory(
     }
 
     public static final int ID_FIELD_NUMBER = 1;
-    private volatile java.lang.Object id_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object id_ = "";
     /**
      * string id = 1;
      * @return The id.
@@ -18514,7 +18262,8 @@ public java.lang.String getId() {
     }
 
     public static final int NAME_FIELD_NUMBER = 2;
-    private volatile java.lang.Object name_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object name_ = "";
     /**
      * string name = 2;
      * @return The name.
@@ -18565,13 +18314,13 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!getIdBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
       }
-      if (!getNameBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -18580,13 +18329,13 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!getIdBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
       }
-      if (!getNameBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -18605,7 +18354,7 @@ public boolean equals(final java.lang.Object obj) {
           .equals(other.getId())) return false;
       if (!getName()
           .equals(other.getName())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -18620,7 +18369,7 @@ public int hashCode() {
       hash = (53 * hash) + getId().hashCode();
       hash = (37 * hash) + NAME_FIELD_NUMBER;
       hash = (53 * hash) + getName().hashCode();
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -18669,11 +18418,13 @@ public static org.languagetool.rules.ml.MLServerProto.RuleCategory parseFrom(
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.RuleCategory parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.RuleCategory parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -18737,26 +18488,20 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.RuleCategory.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         id_ = "";
-
         name_ = "";
-
         return this;
       }
 
@@ -18783,12 +18528,21 @@ public org.languagetool.rules.ml.MLServerProto.RuleCategory build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.RuleCategory buildPartial() {
         org.languagetool.rules.ml.MLServerProto.RuleCategory result = new org.languagetool.rules.ml.MLServerProto.RuleCategory(this);
-        result.id_ = id_;
-        result.name_ = name_;
+        if (bitField0_ != 0) { buildPartial0(result); }
         onBuilt();
         return result;
       }
 
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.RuleCategory result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          result.id_ = id_;
+        }
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.name_ = name_;
+        }
+      }
+
       @java.lang.Override
       public Builder clone() {
         return super.clone();
@@ -18835,13 +18589,15 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.RuleCategory ot
         if (other == org.languagetool.rules.ml.MLServerProto.RuleCategory.getDefaultInstance()) return this;
         if (!other.getId().isEmpty()) {
           id_ = other.id_;
+          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getName().isEmpty()) {
           name_ = other.name_;
+          bitField0_ |= 0x00000002;
           onChanged();
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -18856,19 +18612,43 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.RuleCategory parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                id_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 10
+              case 18: {
+                name_ = 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) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.RuleCategory) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
+      private int bitField0_;
 
       private java.lang.Object id_ = "";
       /**
@@ -18911,11 +18691,9 @@ public java.lang.String getId() {
        */
       public Builder setId(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         id_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -18924,8 +18702,8 @@ public Builder setId(
        * @return This builder for chaining.
        */
       public Builder clearId() {
-        
         id_ = getDefaultInstance().getId();
+        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -18936,12 +18714,10 @@ public Builder clearId() {
        */
       public Builder setIdBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         id_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -18987,11 +18763,9 @@ public java.lang.String getName() {
        */
       public Builder setName(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         name_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -19000,8 +18774,8 @@ public Builder setName(
        * @return This builder for chaining.
        */
       public Builder clearName() {
-        
         name_ = getDefaultInstance().getName();
+        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -19012,12 +18786,10 @@ public Builder clearName() {
        */
       public Builder setNameBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         name_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -19054,7 +18826,18 @@ public RuleCategory parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new RuleCategory(input, extensionRegistry);
+        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();
       }
     };
 
@@ -19169,77 +18952,6 @@ protected java.lang.Object newInstance(
       return new SuggestedReplacement();
     }
 
-    @java.lang.Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private SuggestedReplacement(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new java.lang.NullPointerException();
-      }
-      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-          com.google.protobuf.UnknownFieldSet.newBuilder();
-      try {
-        boolean done = false;
-        while (!done) {
-          int tag = input.readTag();
-          switch (tag) {
-            case 0:
-              done = true;
-              break;
-            case 10: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              replacement_ = s;
-              break;
-            }
-            case 18: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              description_ = s;
-              break;
-            }
-            case 26: {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              suffix_ = s;
-              break;
-            }
-            case 37: {
-
-              confidence_ = input.readFloat();
-              break;
-            }
-            case 40: {
-              int rawValue = input.readEnum();
-
-              type_ = rawValue;
-              break;
-            }
-            default: {
-              if (!parseUnknownField(
-                  input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-          }
-        }
-      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        throw e.setUnfinishedMessage(this);
-      } catch (java.io.IOException e) {
-        throw new com.google.protobuf.InvalidProtocolBufferException(
-            e).setUnfinishedMessage(this);
-      } finally {
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return org.languagetool.rules.ml.MLServerProto.internal_static_lt_ml_server_SuggestedReplacement_descriptor;
@@ -19371,7 +19083,8 @@ private SuggestionType(int value) {
     }
 
     public static final int REPLACEMENT_FIELD_NUMBER = 1;
-    private volatile java.lang.Object replacement_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object replacement_ = "";
     /**
      * string replacement = 1;
      * @return The replacement.
@@ -19409,7 +19122,8 @@ public java.lang.String getReplacement() {
     }
 
     public static final int DESCRIPTION_FIELD_NUMBER = 2;
-    private volatile java.lang.Object description_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object description_ = "";
     /**
      * string description = 2;
      * @return The description.
@@ -19447,7 +19161,8 @@ public java.lang.String getDescription() {
     }
 
     public static final int SUFFIX_FIELD_NUMBER = 3;
-    private volatile java.lang.Object suffix_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object suffix_ = "";
     /**
      * 
      * Value shown in the UI after the replacement (but not part of it).
@@ -19493,7 +19208,7 @@ public java.lang.String getSuffix() {
     }
 
     public static final int CONFIDENCE_FIELD_NUMBER = 4;
-    private float confidence_;
+    private float confidence_ = 0F;
     /**
      * 
      * from 0 (lowest) to 1 (highest)
@@ -19508,7 +19223,7 @@ public float getConfidence() {
     }
 
     public static final int TYPE_FIELD_NUMBER = 5;
-    private int type_;
+    private int type_ = 0;
     /**
      * .lt_ml_server.SuggestedReplacement.SuggestionType type = 5;
      * @return The enum numeric value on the wire for type.
@@ -19521,8 +19236,7 @@ public float getConfidence() {
      * @return The type.
      */
     @java.lang.Override public org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType getType() {
-      @SuppressWarnings("deprecation")
-      org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType result = org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType.valueOf(type_);
+      org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType result = org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType.forNumber(type_);
       return result == null ? org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType.UNRECOGNIZED : result;
     }
 
@@ -19540,22 +19254,22 @@ public final boolean isInitialized() {
     @java.lang.Override
     public void writeTo(com.google.protobuf.CodedOutputStream output)
                         throws java.io.IOException {
-      if (!getReplacementBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacement_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 1, replacement_);
       }
-      if (!getDescriptionBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
       }
-      if (!getSuffixBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(suffix_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 3, suffix_);
       }
-      if (confidence_ != 0F) {
+      if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
         output.writeFloat(4, confidence_);
       }
       if (type_ != org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType.Default.getNumber()) {
         output.writeEnum(5, type_);
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @java.lang.Override
@@ -19564,16 +19278,16 @@ public int getSerializedSize() {
       if (size != -1) return size;
 
       size = 0;
-      if (!getReplacementBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacement_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, replacement_);
       }
-      if (!getDescriptionBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
       }
-      if (!getSuffixBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(suffix_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, suffix_);
       }
-      if (confidence_ != 0F) {
+      if (java.lang.Float.floatToRawIntBits(confidence_) != 0) {
         size += com.google.protobuf.CodedOutputStream
           .computeFloatSize(4, confidence_);
       }
@@ -19581,7 +19295,7 @@ public int getSerializedSize() {
         size += com.google.protobuf.CodedOutputStream
           .computeEnumSize(5, type_);
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -19606,7 +19320,7 @@ public boolean equals(final java.lang.Object obj) {
           != java.lang.Float.floatToIntBits(
               other.getConfidence())) return false;
       if (type_ != other.type_) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -19628,7 +19342,7 @@ public int hashCode() {
           getConfidence());
       hash = (37 * hash) + TYPE_FIELD_NUMBER;
       hash = (53 * hash) + type_;
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
@@ -19677,11 +19391,13 @@ public static org.languagetool.rules.ml.MLServerProto.SuggestedReplacement parse
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.SuggestedReplacement parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
+
     public static org.languagetool.rules.ml.MLServerProto.SuggestedReplacement parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -19745,32 +19461,23 @@ public static final class Builder extends
 
       // Construct using org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
+
       }
       @java.lang.Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         replacement_ = "";
-
         description_ = "";
-
         suffix_ = "";
-
         confidence_ = 0F;
-
         type_ = 0;
-
         return this;
       }
 
@@ -19797,15 +19504,30 @@ public org.languagetool.rules.ml.MLServerProto.SuggestedReplacement build() {
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.SuggestedReplacement buildPartial() {
         org.languagetool.rules.ml.MLServerProto.SuggestedReplacement result = new org.languagetool.rules.ml.MLServerProto.SuggestedReplacement(this);
-        result.replacement_ = replacement_;
-        result.description_ = description_;
-        result.suffix_ = suffix_;
-        result.confidence_ = confidence_;
-        result.type_ = type_;
+        if (bitField0_ != 0) { buildPartial0(result); }
         onBuilt();
         return result;
       }
 
+      private void buildPartial0(org.languagetool.rules.ml.MLServerProto.SuggestedReplacement result) {
+        int from_bitField0_ = bitField0_;
+        if (((from_bitField0_ & 0x00000001) != 0)) {
+          result.replacement_ = replacement_;
+        }
+        if (((from_bitField0_ & 0x00000002) != 0)) {
+          result.description_ = description_;
+        }
+        if (((from_bitField0_ & 0x00000004) != 0)) {
+          result.suffix_ = suffix_;
+        }
+        if (((from_bitField0_ & 0x00000008) != 0)) {
+          result.confidence_ = confidence_;
+        }
+        if (((from_bitField0_ & 0x00000010) != 0)) {
+          result.type_ = type_;
+        }
+      }
+
       @java.lang.Override
       public Builder clone() {
         return super.clone();
@@ -19852,14 +19574,17 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.SuggestedReplac
         if (other == org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.getDefaultInstance()) return this;
         if (!other.getReplacement().isEmpty()) {
           replacement_ = other.replacement_;
+          bitField0_ |= 0x00000001;
           onChanged();
         }
         if (!other.getDescription().isEmpty()) {
           description_ = other.description_;
+          bitField0_ |= 0x00000002;
           onChanged();
         }
         if (!other.getSuffix().isEmpty()) {
           suffix_ = other.suffix_;
+          bitField0_ |= 0x00000004;
           onChanged();
         }
         if (other.getConfidence() != 0F) {
@@ -19868,7 +19593,7 @@ public Builder mergeFrom(org.languagetool.rules.ml.MLServerProto.SuggestedReplac
         if (other.type_ != 0) {
           setTypeValue(other.getTypeValue());
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -19883,19 +19608,58 @@ public Builder mergeFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        org.languagetool.rules.ml.MLServerProto.SuggestedReplacement parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new java.lang.NullPointerException();
+        }
         try {
-          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+          boolean done = false;
+          while (!done) {
+            int tag = input.readTag();
+            switch (tag) {
+              case 0:
+                done = true;
+                break;
+              case 10: {
+                replacement_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000001;
+                break;
+              } // case 10
+              case 18: {
+                description_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 18
+              case 26: {
+                suffix_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 26
+              case 37: {
+                confidence_ = input.readFloat();
+                bitField0_ |= 0x00000008;
+                break;
+              } // case 37
+              case 40: {
+                type_ = input.readEnum();
+                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) {
-          parsedMessage = (org.languagetool.rules.ml.MLServerProto.SuggestedReplacement) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
+      private int bitField0_;
 
       private java.lang.Object replacement_ = "";
       /**
@@ -19938,11 +19702,9 @@ public java.lang.String getReplacement() {
        */
       public Builder setReplacement(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         replacement_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -19951,8 +19713,8 @@ public Builder setReplacement(
        * @return This builder for chaining.
        */
       public Builder clearReplacement() {
-        
         replacement_ = getDefaultInstance().getReplacement();
+        bitField0_ = (bitField0_ & ~0x00000001);
         onChanged();
         return this;
       }
@@ -19963,12 +19725,10 @@ public Builder clearReplacement() {
        */
       public Builder setReplacementBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         replacement_ = value;
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -20014,11 +19774,9 @@ public java.lang.String getDescription() {
        */
       public Builder setDescription(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         description_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -20027,8 +19785,8 @@ public Builder setDescription(
        * @return This builder for chaining.
        */
       public Builder clearDescription() {
-        
         description_ = getDefaultInstance().getDescription();
+        bitField0_ = (bitField0_ & ~0x00000002);
         onChanged();
         return this;
       }
@@ -20039,12 +19797,10 @@ public Builder clearDescription() {
        */
       public Builder setDescriptionBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         description_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -20102,11 +19858,9 @@ public java.lang.String getSuffix() {
        */
       public Builder setSuffix(
           java.lang.String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         suffix_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -20119,8 +19873,8 @@ public Builder setSuffix(
        * @return This builder for chaining.
        */
       public Builder clearSuffix() {
-        
         suffix_ = getDefaultInstance().getSuffix();
+        bitField0_ = (bitField0_ & ~0x00000004);
         onChanged();
         return this;
       }
@@ -20135,12 +19889,10 @@ public Builder clearSuffix() {
        */
       public Builder setSuffixBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         suffix_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -20168,8 +19920,9 @@ public float getConfidence() {
        * @return This builder for chaining.
        */
       public Builder setConfidence(float value) {
-        
+
         confidence_ = value;
+        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -20182,7 +19935,7 @@ public Builder setConfidence(float value) {
        * @return This builder for chaining.
        */
       public Builder clearConfidence() {
-        
+        bitField0_ = (bitField0_ & ~0x00000008);
         confidence_ = 0F;
         onChanged();
         return this;
@@ -20202,8 +19955,8 @@ public Builder clearConfidence() {
        * @return This builder for chaining.
        */
       public Builder setTypeValue(int value) {
-        
         type_ = value;
+        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -20213,8 +19966,7 @@ public Builder setTypeValue(int value) {
        */
       @java.lang.Override
       public org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType getType() {
-        @SuppressWarnings("deprecation")
-        org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType result = org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType.valueOf(type_);
+        org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType result = org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType.forNumber(type_);
         return result == null ? org.languagetool.rules.ml.MLServerProto.SuggestedReplacement.SuggestionType.UNRECOGNIZED : result;
       }
       /**
@@ -20226,7 +19978,7 @@ public Builder setType(org.languagetool.rules.ml.MLServerProto.SuggestedReplacem
         if (value == null) {
           throw new NullPointerException();
         }
-        
+        bitField0_ |= 0x00000010;
         type_ = value.getNumber();
         onChanged();
         return this;
@@ -20236,7 +19988,7 @@ public Builder setType(org.languagetool.rules.ml.MLServerProto.SuggestedReplacem
        * @return This builder for chaining.
        */
       public Builder clearType() {
-        
+        bitField0_ = (bitField0_ & ~0x00000010);
         type_ = 0;
         onChanged();
         return this;
@@ -20274,7 +20026,18 @@ public SuggestedReplacement parsePartialFrom(
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new SuggestedReplacement(input, extensionRegistry);
+        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();
       }
     };
 
diff --git a/languagetool-core/src/main/java/org/languagetool/rules/ml/PostProcessingServerGrpc.java b/languagetool-core/src/main/java/org/languagetool/rules/ml/PostProcessingServerGrpc.java
index 735fec6bcd69..f00fb4f7c389 100644
--- a/languagetool-core/src/main/java/org/languagetool/rules/ml/PostProcessingServerGrpc.java
+++ b/languagetool-core/src/main/java/org/languagetool/rules/ml/PostProcessingServerGrpc.java
@@ -8,14 +8,14 @@
  * 
*/ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", + value = "by gRPC proto compiler (version 1.68.0)", comments = "Source: ml_server.proto") @io.grpc.stub.annotations.GrpcGenerated public final class PostProcessingServerGrpc { private PostProcessingServerGrpc() {} - public static final String SERVICE_NAME = "lt_ml_server.PostProcessingServer"; + public static final java.lang.String SERVICE_NAME = "lt_ml_server.PostProcessingServer"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor */ - public static abstract class PostProcessingServerImplBase implements io.grpc.BindableService { + public interface AsyncService { /** */ - public void process(org.languagetool.rules.ml.MLServerProto.PostProcessingRequest request, + default void process(org.languagetool.rules.ml.MLServerProto.PostProcessingRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getProcessMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service PostProcessingServer. + *
+   * for e.g. resorting suggestions
+   * 
+ */ + public static abstract class PostProcessingServerImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getProcessMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - org.languagetool.rules.ml.MLServerProto.PostProcessingRequest, - org.languagetool.rules.ml.MLServerProto.MatchResponse>( - this, METHODID_PROCESS))) - .build(); + return PostProcessingServerGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service PostProcessingServer. *
    * for e.g. resorting suggestions
    * 
*/ - public static final class PostProcessingServerStub extends io.grpc.stub.AbstractAsyncStub { + public static final class PostProcessingServerStub + extends io.grpc.stub.AbstractAsyncStub { private PostProcessingServerStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -147,11 +151,13 @@ public void process(org.languagetool.rules.ml.MLServerProto.PostProcessingReques } /** + * A stub to allow clients to do synchronous rpc calls to service PostProcessingServer. *
    * for e.g. resorting suggestions
    * 
*/ - public static final class PostProcessingServerBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class PostProcessingServerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private PostProcessingServerBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -172,11 +178,13 @@ public org.languagetool.rules.ml.MLServerProto.MatchResponse process(org.languag } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service PostProcessingServer. *
    * for e.g. resorting suggestions
    * 
*/ - public static final class PostProcessingServerFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class PostProcessingServerFutureStub + extends io.grpc.stub.AbstractFutureStub { private PostProcessingServerFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -204,10 +212,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final PostProcessingServerImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(PostProcessingServerImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -236,6 +244,18 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.languagetool.rules.ml.MLServerProto.PostProcessingRequest, + org.languagetool.rules.ml.MLServerProto.MatchResponse>( + service, METHODID_PROCESS))) + .build(); + } + private static abstract class PostProcessingServerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { PostProcessingServerBaseDescriptorSupplier() {} @@ -259,9 +279,9 @@ private static final class PostProcessingServerFileDescriptorSupplier private static final class PostProcessingServerMethodDescriptorSupplier extends PostProcessingServerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - PostProcessingServerMethodDescriptorSupplier(String methodName) { + PostProcessingServerMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/languagetool-core/src/main/java/org/languagetool/rules/ml/ProcessingServerGrpc.java b/languagetool-core/src/main/java/org/languagetool/rules/ml/ProcessingServerGrpc.java index 3572cb260cac..dbeae4908162 100644 --- a/languagetool-core/src/main/java/org/languagetool/rules/ml/ProcessingServerGrpc.java +++ b/languagetool-core/src/main/java/org/languagetool/rules/ml/ProcessingServerGrpc.java @@ -5,14 +5,14 @@ /** */ @javax.annotation.Generated( - value = "by gRPC proto compiler (version 1.50.2)", + value = "by gRPC proto compiler (version 1.68.0)", comments = "Source: ml_server.proto") @io.grpc.stub.annotations.GrpcGenerated public final class ProcessingServerGrpc { private ProcessingServerGrpc() {} - public static final String SERVICE_NAME = "lt_ml_server.ProcessingServer"; + public static final java.lang.String SERVICE_NAME = "lt_ml_server.ProcessingServer"; // Static method descriptors that strictly reflect the proto. private static volatile io.grpc.MethodDescriptor responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getAnalyzeMethod(), responseObserver); } /** */ - public void process(org.languagetool.rules.ml.MLServerProto.ProcessRequest request, + default void process(org.languagetool.rules.ml.MLServerProto.ProcessRequest request, io.grpc.stub.StreamObserver responseObserver) { io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getProcessMethod(), responseObserver); } + } + + /** + * Base class for the server implementation of the service ProcessingServer. + */ + public static abstract class ProcessingServerImplBase + implements io.grpc.BindableService, AsyncService { @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getAnalyzeMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - org.languagetool.rules.ml.MLServerProto.AnalyzeRequest, - org.languagetool.rules.ml.MLServerProto.AnalyzeResponse>( - this, METHODID_ANALYZE))) - .addMethod( - getProcessMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - org.languagetool.rules.ml.MLServerProto.ProcessRequest, - org.languagetool.rules.ml.MLServerProto.ProcessResponse>( - this, METHODID_PROCESS))) - .build(); + return ProcessingServerGrpc.bindService(this); } } /** + * A stub to allow clients to do asynchronous rpc calls to service ProcessingServer. */ - public static final class ProcessingServerStub extends io.grpc.stub.AbstractAsyncStub { + public static final class ProcessingServerStub + extends io.grpc.stub.AbstractAsyncStub { private ProcessingServerStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -191,8 +185,10 @@ public void process(org.languagetool.rules.ml.MLServerProto.ProcessRequest reque } /** + * A stub to allow clients to do synchronous rpc calls to service ProcessingServer. */ - public static final class ProcessingServerBlockingStub extends io.grpc.stub.AbstractBlockingStub { + public static final class ProcessingServerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { private ProcessingServerBlockingStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -220,8 +216,10 @@ public org.languagetool.rules.ml.MLServerProto.ProcessResponse process(org.langu } /** + * A stub to allow clients to do ListenableFuture-style rpc calls to service ProcessingServer. */ - public static final class ProcessingServerFutureStub extends io.grpc.stub.AbstractFutureStub { + public static final class ProcessingServerFutureStub + extends io.grpc.stub.AbstractFutureStub { private ProcessingServerFutureStub( io.grpc.Channel channel, io.grpc.CallOptions callOptions) { super(channel, callOptions); @@ -258,10 +256,10 @@ private static final class MethodHandlers implements io.grpc.stub.ServerCalls.ServerStreamingMethod, io.grpc.stub.ServerCalls.ClientStreamingMethod, io.grpc.stub.ServerCalls.BidiStreamingMethod { - private final ProcessingServerImplBase serviceImpl; + private final AsyncService serviceImpl; private final int methodId; - MethodHandlers(ProcessingServerImplBase serviceImpl, int methodId) { + MethodHandlers(AsyncService serviceImpl, int methodId) { this.serviceImpl = serviceImpl; this.methodId = methodId; } @@ -294,6 +292,25 @@ public io.grpc.stub.StreamObserver invoke( } } + public static final io.grpc.ServerServiceDefinition bindService(AsyncService service) { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getAnalyzeMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.languagetool.rules.ml.MLServerProto.AnalyzeRequest, + org.languagetool.rules.ml.MLServerProto.AnalyzeResponse>( + service, METHODID_ANALYZE))) + .addMethod( + getProcessMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.languagetool.rules.ml.MLServerProto.ProcessRequest, + org.languagetool.rules.ml.MLServerProto.ProcessResponse>( + service, METHODID_PROCESS))) + .build(); + } + private static abstract class ProcessingServerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier { ProcessingServerBaseDescriptorSupplier() {} @@ -317,9 +334,9 @@ private static final class ProcessingServerFileDescriptorSupplier private static final class ProcessingServerMethodDescriptorSupplier extends ProcessingServerBaseDescriptorSupplier implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; + private final java.lang.String methodName; - ProcessingServerMethodDescriptorSupplier(String methodName) { + ProcessingServerMethodDescriptorSupplier(java.lang.String methodName) { this.methodName = methodName; } diff --git a/pom.xml b/pom.xml index 795e223607e1..0229069d59ce 100644 --- a/pom.xml +++ b/pom.xml @@ -150,7 +150,7 @@ 1.5 1.68.0 - 4.28.2 + 3.25.5 3.4.1