From dc63c8057a59f60eaf04382d3d980b8c40a37155 Mon Sep 17 00:00:00 2001 From: seakider Date: Mon, 22 Jul 2024 23:41:08 +0800 Subject: [PATCH 1/3] Feature - support json.mget Signed-off-by: seakider --- .../src/main/java/org/redisson/Redisson.java | 7 +- .../org/redisson/RedissonJsonBuckets.java | 147 ++++++++++++++++++ .../java/org/redisson/RedissonReactive.java | 7 +- .../main/java/org/redisson/RedissonRx.java | 7 +- .../java/org/redisson/api/RJsonBuckets.java | 59 +++++++ .../org/redisson/api/RJsonBucketsAsync.java | 59 +++++++ .../redisson/api/RJsonBucketsReactive.java | 60 +++++++ .../java/org/redisson/api/RJsonBucketsRx.java | 61 ++++++++ .../java/org/redisson/api/RedissonClient.java | 11 +- .../redisson/api/RedissonReactiveClient.java | 11 +- .../org/redisson/api/RedissonRxClient.java | 11 +- .../org/redisson/RedissonJsonBucketsTest.java | 73 +++++++++ 12 files changed, 507 insertions(+), 6 deletions(-) create mode 100644 redisson/src/main/java/org/redisson/RedissonJsonBuckets.java create mode 100644 redisson/src/main/java/org/redisson/api/RJsonBuckets.java create mode 100644 redisson/src/main/java/org/redisson/api/RJsonBucketsAsync.java create mode 100644 redisson/src/main/java/org/redisson/api/RJsonBucketsReactive.java create mode 100644 redisson/src/main/java/org/redisson/api/RJsonBucketsRx.java create mode 100644 redisson/src/test/java/org/redisson/RedissonJsonBucketsTest.java diff --git a/redisson/src/main/java/org/redisson/Redisson.java b/redisson/src/main/java/org/redisson/Redisson.java index a65ee9b36..37c39e32f 100755 --- a/redisson/src/main/java/org/redisson/Redisson.java +++ b/redisson/src/main/java/org/redisson/Redisson.java @@ -292,7 +292,12 @@ public final class Redisson implements RedissonClient { JsonBucketParams params = (JsonBucketParams) options; return new RedissonJsonBucket<>(params.getCodec(), commandExecutor, params.getName()); } - + + @Override + public RJsonBuckets getJsonBuckets(JsonCodec codec) { + return new RedissonJsonBuckets(codec, commandExecutor); + } + @Override public RHyperLogLog getHyperLogLog(String name) { return new RedissonHyperLogLog(commandExecutor, name); diff --git a/redisson/src/main/java/org/redisson/RedissonJsonBuckets.java b/redisson/src/main/java/org/redisson/RedissonJsonBuckets.java new file mode 100644 index 000000000..324ec8823 --- /dev/null +++ b/redisson/src/main/java/org/redisson/RedissonJsonBuckets.java @@ -0,0 +1,147 @@ +/** + * Copyright (c) 2013-2024 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson; + +import org.redisson.api.RFuture; +import org.redisson.api.RJsonBuckets; +import org.redisson.client.protocol.RedisCommand; +import org.redisson.client.protocol.RedisCommands; +import org.redisson.codec.JsonCodec; +import org.redisson.codec.JsonCodecWrapper; +import org.redisson.command.CommandAsyncExecutor; +import org.redisson.connection.decoder.BucketsDecoder; +import org.redisson.connection.decoder.MapGetAllDecoder; +import org.redisson.misc.CompletableFutureWrapper; + +import java.io.IOException; +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.stream.Collectors; + +public class RedissonJsonBuckets implements RJsonBuckets { + + protected final JsonCodec codec; + protected final CommandAsyncExecutor commandExecutor; + + public RedissonJsonBuckets(JsonCodec codec, CommandAsyncExecutor commandExecutor) { + this.codec = codec; + this.commandExecutor = commandExecutor; + } + + @Override + public Map get(String... keys) { + RFuture> future = getAsync(keys); + return commandExecutor.get(future); + } + + @Override + public RFuture> getAsync(String... keys) { + return getAsync(codec, ".", keys); + } + + @Override + public Map get(JsonCodec codec, String path, String... keys) { + RFuture> future = getAsync(codec, path, keys); + return commandExecutor.get(future); + } + + @Override + public RFuture> getAsync(JsonCodec codec, String path, String... keys) { + if (keys.length == 0) { + return new CompletableFutureWrapper<>(Collections.emptyMap()); + } + + List keysList = Arrays.stream(keys) + .map(k -> commandExecutor.getServiceManager().getConfig().getNameMapper().map(k)) + .collect(Collectors.toList()); + + JsonCodecWrapper jsonCodec = new JsonCodecWrapper(codec); + RedisCommand> command = new RedisCommand>("JSON.MGET", new MapGetAllDecoder(keysList, 0)); + return commandExecutor.readBatchedAsync(jsonCodec, command, new SlotCallback, Map>() { + final Map results = new ConcurrentHashMap<>(); + + @Override + public void onSlotResult(List keys, Map result) { + for (Map.Entry entry : result.entrySet()) { + if (entry.getKey() != null && entry.getValue() != null) { + String key = commandExecutor.getServiceManager().getConfig().getNameMapper().unmap((String) entry.getKey()); + results.put(key, (V) entry.getValue()); + } + } + } + + @Override + public Map onFinish() { + return results; + } + + @Override + public RedisCommand> createCommand(List keys) { + return new RedisCommand<>("JSON.MGET", new BucketsDecoder(keys)); + } + + @Override + public Object[] createParams(List params) { + ArrayList newParams = new ArrayList<>(params); + newParams.add(path); + return newParams.toArray(); + } + }, keysList.toArray(new Object[0])); + } + + @Override + public void set(Map buckets) { + commandExecutor.get(setAsync(buckets)); + } + + @Override + public RFuture setAsync(Map buckets) { + return setAsync(codec, ".", buckets); + } + + @Override + public void set(JsonCodec codec, String path, Map buckets) { + commandExecutor.get(setAsync(codec, path, buckets)); + } + + @Override + public RFuture setAsync(JsonCodec codec, String path, Map buckets) { + if (buckets.isEmpty()) { + return new CompletableFutureWrapper<>((Void) null); + } + + Map mappedBuckets = buckets.entrySet().stream().collect( + Collectors.toMap(e -> commandExecutor.getServiceManager().getConfig().getNameMapper().map(e.getKey()), + Map.Entry::getValue)); + JsonCodecWrapper jsonCodec = new JsonCodecWrapper(codec); + return commandExecutor.writeBatchedAsync(jsonCodec, RedisCommands.JSON_MSET, new VoidSlotCallback() { + @Override + public Object[] createParams(List keys) { + List params = new ArrayList<>(keys.size()); + for (Object key : keys) { + params.add(key); + params.add(path); + try { + params.add(jsonCodec.getValueEncoder().encode(mappedBuckets.get(key))); + } catch (IOException e) { + throw new IllegalArgumentException(e); + } + } + return params.toArray(); + } + }, mappedBuckets.keySet().toArray(new Object[0])); + } +} \ No newline at end of file diff --git a/redisson/src/main/java/org/redisson/RedissonReactive.java b/redisson/src/main/java/org/redisson/RedissonReactive.java index 2397f5965..ea5792be1 100644 --- a/redisson/src/main/java/org/redisson/RedissonReactive.java +++ b/redisson/src/main/java/org/redisson/RedissonReactive.java @@ -433,7 +433,12 @@ public class RedissonReactive implements RedissonReactiveClient { return ReactiveProxyBuilder.create(commandExecutor, new RedissonJsonBucket(params.getCodec(), ca, params.getName()), RJsonBucketReactive.class); } - + + @Override + public RJsonBucketsReactive getJsonBuckets(JsonCodec codec) { + return ReactiveProxyBuilder.create(commandExecutor, new RedissonJsonBuckets(codec, commandExecutor), RJsonBucketsReactive.class); + } + @Override public RHyperLogLogReactive getHyperLogLog(String name) { return ReactiveProxyBuilder.create(commandExecutor, new RedissonHyperLogLog(commandExecutor, name), RHyperLogLogReactive.class); diff --git a/redisson/src/main/java/org/redisson/RedissonRx.java b/redisson/src/main/java/org/redisson/RedissonRx.java index 210f7ab09..da1014608 100644 --- a/redisson/src/main/java/org/redisson/RedissonRx.java +++ b/redisson/src/main/java/org/redisson/RedissonRx.java @@ -367,7 +367,12 @@ public class RedissonRx implements RedissonRxClient { CommandRxExecutor ce = commandExecutor.copy(params); return RxProxyBuilder.create(commandExecutor, new RedissonJsonBucket<>(params.getCodec(), ce, params.getName()), RJsonBucketRx.class); } - + + @Override + public RJsonBucketsRx getJsonBuckets(JsonCodec codec) { + return RxProxyBuilder.create(commandExecutor, new RedissonJsonBuckets(codec, commandExecutor), RJsonBucketsRx.class); + } + @Override public RHyperLogLogRx getHyperLogLog(String name) { return RxProxyBuilder.create(commandExecutor, new RedissonHyperLogLog(commandExecutor, name), RHyperLogLogRx.class); diff --git a/redisson/src/main/java/org/redisson/api/RJsonBuckets.java b/redisson/src/main/java/org/redisson/api/RJsonBuckets.java new file mode 100644 index 000000000..48b9e9e6b --- /dev/null +++ b/redisson/src/main/java/org/redisson/api/RJsonBuckets.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2013-2024 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson.api; + +import org.redisson.codec.JsonCodec; + +import java.util.Map; + +public interface RJsonBuckets extends RJsonBucketsAsync { + + /** + * Returns Redis json object mapped by key with default path + * + * @param keys keys + * @param type of object with specific json-path + * @return Map with name as key and bucket as value + */ + Map get(String... keys); + + /** + * Returns Redis json object mapped by key with specific path + * + * @param codec codec for specific path + * @param path json path + * @param keys keys + * @param type of value at specific json-path + * @return Map with name as key and bucket as value + */ + Map get(JsonCodec codec, String path, String... keys); + + /** + * Saves json objects with default path mapped by Redis key. + * + * @param buckets map of json buckets + */ + void set(Map buckets); + + /** + * Saves json objects with specific path mapped by Redis key. + * + * @param codec codec for specific path + * @param path json path + * @param buckets map of json buckets + */ + void set(JsonCodec codec, String path, Map buckets); +} diff --git a/redisson/src/main/java/org/redisson/api/RJsonBucketsAsync.java b/redisson/src/main/java/org/redisson/api/RJsonBucketsAsync.java new file mode 100644 index 000000000..a70d4bfc6 --- /dev/null +++ b/redisson/src/main/java/org/redisson/api/RJsonBucketsAsync.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) 2013-2024 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson.api; + +import org.redisson.codec.JsonCodec; + +import java.util.Map; + +public interface RJsonBucketsAsync { + + /** + * Returns Redis json object mapped by key with default path + * + * @param keys keys + * @param type of object with specific json-path + * @return Map with name as key and bucket as value + */ + RFuture> getAsync(String... keys); + + /** + * Returns Redis json object mapped by key with specific path + * + * @param codec codec for specific path + * @param path json path + * @param keys keys + * @param type of value at specific json-path + * @return Map with name as key and bucket as value + */ + RFuture> getAsync(JsonCodec codec, String path, String... keys); + + /** + * Saves json objects with default path mapped by Redis key. + * + * @param buckets map of json buckets + */ + RFuture setAsync(Map buckets); + + /** + * Saves json objects with specific path mapped by Redis key. + * + * @param codec codec for specific path + * @param path json path + * @param buckets map of json buckets + */ + RFuture setAsync(JsonCodec codec, String path, Map buckets); +} diff --git a/redisson/src/main/java/org/redisson/api/RJsonBucketsReactive.java b/redisson/src/main/java/org/redisson/api/RJsonBucketsReactive.java new file mode 100644 index 000000000..86ac3470d --- /dev/null +++ b/redisson/src/main/java/org/redisson/api/RJsonBucketsReactive.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) 2013-2024 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson.api; + +import org.redisson.codec.JsonCodec; +import reactor.core.publisher.Mono; + +import java.util.Map; + +public interface RJsonBucketsReactive { + + /** + * Returns Redis json object mapped by key with default path + * + * @param keys keys + * @param type of object with specific json-path + * @return Map with name as key and bucket as value + */ + Mono> get(String... keys); + + /** + * Returns Redis json object mapped by key with specific path + * + * @param codec codec for specific path + * @param path json path + * @param keys keys + * @param type of value at specific json-path + * @return Map with name as key and bucket as value + */ + Mono> get(JsonCodec codec, String path, String... keys); + + /** + * Saves json objects with default path mapped by Redis key. + * + * @param buckets map of json buckets + */ + Mono set(Map buckets); + + /** + * Saves json objects with specific path mapped by Redis key. + * + * @param codec codec for specific path + * @param path json path + * @param buckets map of json buckets + */ + Mono set(JsonCodec codec, String path, Map buckets); +} diff --git a/redisson/src/main/java/org/redisson/api/RJsonBucketsRx.java b/redisson/src/main/java/org/redisson/api/RJsonBucketsRx.java new file mode 100644 index 000000000..b288a0e3e --- /dev/null +++ b/redisson/src/main/java/org/redisson/api/RJsonBucketsRx.java @@ -0,0 +1,61 @@ +/** + * Copyright (c) 2013-2024 Nikita Koksharov + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.redisson.api; + +import io.reactivex.rxjava3.core.Completable; +import io.reactivex.rxjava3.core.Single; +import org.redisson.codec.JsonCodec; + +import java.util.Map; + +public interface RJsonBucketsRx { + + /** + * Returns Redis json object mapped by key with default path + * + * @param keys keys + * @param type of object with specific json-path + * @return Map with name as key and bucket as value + */ + Single> get(String... keys); + + /** + * Returns Redis json object mapped by key with specific path + * + * @param codec codec for specific path + * @param path json path + * @param keys keys + * @param type of value at specific json-path + * @return Map with name as key and bucket as value + */ + Single> get(JsonCodec codec, String path, String... keys); + + /** + * Saves json objects with default path mapped by Redis key. + * + * @param buckets map of json buckets + */ + Completable set(Map buckets); + + /** + * Saves json objects with specific path mapped by Redis key. + * + * @param codec codec for specific path + * @param path json path + * @param buckets map of json buckets + */ + Completable set(JsonCodec codec, String path, Map buckets); +} diff --git a/redisson/src/main/java/org/redisson/api/RedissonClient.java b/redisson/src/main/java/org/redisson/api/RedissonClient.java index 92b8ec63a..8b9a3d77d 100755 --- a/redisson/src/main/java/org/redisson/api/RedissonClient.java +++ b/redisson/src/main/java/org/redisson/api/RedissonClient.java @@ -371,7 +371,16 @@ public interface RedissonClient { * @return JsonBucket object */ RJsonBucket getJsonBucket(JsonBucketOptions options); - + + /** + * Returns API for mass operations over JsonBucket objects + * using provided codec for JSON object with default path. + * + * @param codec using provided codec for JSON object with default path. + * @return JsonBuckets + */ + RJsonBuckets getJsonBuckets(JsonCodec codec); + /** * Returns HyperLogLog instance by name. * diff --git a/redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java b/redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java index e04e6f0b7..2aabde9e0 100644 --- a/redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java +++ b/redisson/src/main/java/org/redisson/api/RedissonReactiveClient.java @@ -602,7 +602,16 @@ public interface RedissonReactiveClient { * @return JsonBucket object */ RJsonBucketReactive getJsonBucket(JsonBucketOptions options); - + + /** + * Returns API for mass operations over JsonBucket objects + * using provided codec for JSON object with default path. + * + * @param codec using provided codec for JSON object with default path. + * @return JsonBuckets + */ + RJsonBucketsReactive getJsonBuckets(JsonCodec codec); + /** * Returns HyperLogLog instance by name. * diff --git a/redisson/src/main/java/org/redisson/api/RedissonRxClient.java b/redisson/src/main/java/org/redisson/api/RedissonRxClient.java index 8f7cd33bb..8a199bcfb 100644 --- a/redisson/src/main/java/org/redisson/api/RedissonRxClient.java +++ b/redisson/src/main/java/org/redisson/api/RedissonRxClient.java @@ -591,7 +591,16 @@ public interface RedissonRxClient { * @return JsonBucket object */ RJsonBucketRx getJsonBucket(JsonBucketOptions options); - + + /** + * Returns API for mass operations over JsonBucket objects + * using provided codec for JSON object with default path. + * + * @param codec using provided codec for JSON object with default path. + * @return JsonBuckets + */ + RJsonBucketsRx getJsonBuckets(JsonCodec codec); + /** * Returns HyperLogLog instance by name. * diff --git a/redisson/src/test/java/org/redisson/RedissonJsonBucketsTest.java b/redisson/src/test/java/org/redisson/RedissonJsonBucketsTest.java new file mode 100644 index 000000000..f69f3a3b7 --- /dev/null +++ b/redisson/src/test/java/org/redisson/RedissonJsonBucketsTest.java @@ -0,0 +1,73 @@ +package org.redisson; + +import com.fasterxml.jackson.core.type.TypeReference; +import org.junit.jupiter.api.Test; +import org.redisson.api.RJsonBuckets; +import org.redisson.client.codec.IntegerCodec; +import org.redisson.codec.JacksonCodec; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.IntStream; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.redisson.RedissonJsonBucketTest.NestedType; +import static org.redisson.RedissonJsonBucketTest.TestType; + +public class RedissonJsonBucketsTest extends DockerRedisStackTest { + + @Test + public void testSetAndGet() { + RJsonBuckets buckets = redisson.getJsonBuckets(new JacksonCodec<>(TestType.class)); + Map map = new HashMap<>(); + IntStream.range(0, 1000).forEach(i -> { + TestType testType = new TestType(); + testType.setName("name" + i); + map.put(testType.getName(), testType); + }); + buckets.set(map); + + Map stringObjectMap = buckets.get(map.keySet().toArray(new String[]{})); + assertThat(stringObjectMap.size()).isEqualTo(1000); + } + + @Test + public void testGetWithPath() { + RJsonBuckets buckets = redisson.getJsonBuckets(new JacksonCodec<>(TestType.class)); + Map map = new HashMap<>(); + IntStream.range(0, 1000).forEach(i -> { + TestType testType = new TestType(); + testType.setName("name" + i); + NestedType nestedType = new NestedType(); + nestedType.setValue(i); + testType.setType(nestedType); + map.put(testType.getName(), testType); + }); + buckets.set(map); + + Map> result = buckets.get(new JacksonCodec<>(new TypeReference>() {}), "$.type.value", map.keySet().toArray(new String[]{})); + assertThat(result.size()).isEqualTo(1000); + } + + @Test + public void testSetWithPath() { + RJsonBuckets buckets = redisson.getJsonBuckets(new JacksonCodec<>(TestType.class)); + Map map = new HashMap<>(); + IntStream.range(0, 1000).forEach(i -> { + TestType testType = new TestType(); + testType.setName("name" + i); + NestedType nestedType = new NestedType(); + nestedType.setValue(i); + testType.setType(nestedType); + map.put(testType.getName(), testType); + }); + buckets.set(map); + + map.clear(); + IntStream.range(0, 1000).forEach(i -> { + map.put("name" + i, i + 1); + }); + buckets.set(new IntegerCodec(), "$.type.value", map); + } +} From 39a6deb6386fbd542716e7104ae73386b408622a Mon Sep 17 00:00:00 2001 From: seakider Date: Wed, 24 Jul 2024 23:16:40 +0800 Subject: [PATCH 2/3] Fixed - compilation error Signed-off-by: seakider --- .../org/redisson/RedissonJsonBuckets.java | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/redisson/src/main/java/org/redisson/RedissonJsonBuckets.java b/redisson/src/main/java/org/redisson/RedissonJsonBuckets.java index 324ec8823..6d9f625bc 100644 --- a/redisson/src/main/java/org/redisson/RedissonJsonBuckets.java +++ b/redisson/src/main/java/org/redisson/RedissonJsonBuckets.java @@ -28,7 +28,6 @@ import org.redisson.misc.CompletableFutureWrapper; import java.io.IOException; import java.util.*; -import java.util.concurrent.ConcurrentHashMap; import java.util.stream.Collectors; public class RedissonJsonBuckets implements RJsonBuckets { @@ -71,21 +70,15 @@ public class RedissonJsonBuckets implements RJsonBuckets { JsonCodecWrapper jsonCodec = new JsonCodecWrapper(codec); RedisCommand> command = new RedisCommand>("JSON.MGET", new MapGetAllDecoder(keysList, 0)); return commandExecutor.readBatchedAsync(jsonCodec, command, new SlotCallback, Map>() { - final Map results = new ConcurrentHashMap<>(); - @Override - public void onSlotResult(List keys, Map result) { - for (Map.Entry entry : result.entrySet()) { - if (entry.getKey() != null && entry.getValue() != null) { - String key = commandExecutor.getServiceManager().getConfig().getNameMapper().unmap((String) entry.getKey()); - results.put(key, (V) entry.getValue()); - } - } - } - - @Override - public Map onFinish() { - return results; + public Map onResult(Collection> result) { + return result.stream() + .flatMap(c -> c.entrySet().stream()) + .filter(e -> e.getKey() != null && e.getValue() != null) + .map(e -> { + String key = commandExecutor.getServiceManager().getConfig().getNameMapper().unmap((String) e.getKey()); + return new AbstractMap.SimpleEntry<>(key, (V) e.getValue()); + }).collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue())); } @Override From dac7e98120c825256b1a2f5abb58d269cdb33f39 Mon Sep 17 00:00:00 2001 From: zzhlhc Date: Thu, 25 Jul 2024 22:24:02 +0800 Subject: [PATCH 3/3] upgrade protobuf from 3.16.3 to 4.27.2 Signed-off-by: zzhlhc --- redisson/pom.xml | 4 +- .../protobuf/nativeData/Proto2AllTypes.java | 520 ++++++++------- .../protobuf/nativeData/Proto3AllTypes.java | 601 +++++++++--------- 3 files changed, 556 insertions(+), 569 deletions(-) diff --git a/redisson/pom.xml b/redisson/pom.xml index 8e0a713b3..2caeffbb9 100644 --- a/redisson/pom.xml +++ b/redisson/pom.xml @@ -425,14 +425,14 @@ com.google.protobuf protobuf-java - 3.16.3 + 4.27.2 provided true com.google.protobuf protobuf-java-util - 3.16.3 + 4.27.2 provided true diff --git a/redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto2AllTypes.java b/redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto2AllTypes.java index 62c2ba8c1..cf2b096b8 100644 --- a/redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto2AllTypes.java +++ b/redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto2AllTypes.java @@ -15,7 +15,7 @@ public final class Proto2AllTypes { (com.google.protobuf.ExtensionRegistryLite) registry); } public interface AllTypes2OrBuilder extends - // @@protoc_insertion_point(interface_extends:org.redisson.codec.protobuf.raw.AllTypes2) + // @@protoc_insertion_point(interface_extends:AllTypes2) com.google.protobuf.MessageOrBuilder { /** @@ -208,11 +208,11 @@ public final class Proto2AllTypes { com.google.protobuf.ByteString getBytesType(); } /** - * Protobuf type {@code org.redisson.codec.protobuf.raw.AllTypes2} + * Protobuf type {@code AllTypes2} */ public static final class AllTypes2 extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:org.redisson.codec.protobuf.raw.AllTypes2) + // @@protoc_insertion_point(message_implements:AllTypes2) AllTypes2OrBuilder { private static final long serialVersionUID = 0L; // Use AllTypes2.newBuilder() to construct. @@ -232,144 +232,6 @@ public final class Proto2AllTypes { return new AllTypes2(); } - @Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private AllTypes2( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new 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)) { - doubleType_ = newDoubleList(); - mutable_bitField0_ |= 0x00000001; - } - doubleType_.addDouble(input.readDouble()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - doubleType_ = newDoubleList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - doubleType_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } - case 21: { - bitField0_ |= 0x00000001; - floatType_ = input.readFloat(); - break; - } - case 24: { - bitField0_ |= 0x00000002; - int32Type_ = input.readInt32(); - break; - } - case 32: { - bitField0_ |= 0x00000004; - int64Type_ = input.readInt64(); - break; - } - case 40: { - bitField0_ |= 0x00000008; - uint32Type_ = input.readUInt32(); - break; - } - case 48: { - bitField0_ |= 0x00000010; - uint64Type_ = input.readUInt64(); - break; - } - case 56: { - bitField0_ |= 0x00000020; - sint32Type_ = input.readSInt32(); - break; - } - case 64: { - bitField0_ |= 0x00000040; - sint64Type_ = input.readSInt64(); - break; - } - case 77: { - bitField0_ |= 0x00000080; - fixed32Type_ = input.readFixed32(); - break; - } - case 81: { - bitField0_ |= 0x00000100; - fixed64Type_ = input.readFixed64(); - break; - } - case 93: { - bitField0_ |= 0x00000200; - sfixed32Type_ = input.readSFixed32(); - break; - } - case 97: { - bitField0_ |= 0x00000400; - sfixed64Type_ = input.readSFixed64(); - break; - } - case 104: { - bitField0_ |= 0x00000800; - boolType_ = input.readBool(); - break; - } - case 114: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00001000; - stringType_ = bs; - break; - } - case 122: { - bitField0_ |= 0x00002000; - bytesType_ = input.readBytes(); - 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)) { - doubleType_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return Proto2AllTypes.internal_static_org_redisson_codec_protobuf_raw_AllTypes2_descriptor; @@ -380,12 +242,14 @@ public final class Proto2AllTypes { internalGetFieldAccessorTable() { return Proto2AllTypes.internal_static_org_redisson_codec_protobuf_raw_AllTypes2_fieldAccessorTable .ensureFieldAccessorsInitialized( - AllTypes2.class, Builder.class); + Proto2AllTypes.AllTypes2.class, Proto2AllTypes.AllTypes2.Builder.class); } private int bitField0_; public static final int DOUBLETYPE_FIELD_NUMBER = 1; - private com.google.protobuf.Internal.DoubleList doubleType_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.DoubleList doubleType_ = + emptyDoubleList(); /** *
      *types from https://protobuf.dev/programming-guides/proto2/
@@ -424,7 +288,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int FLOATTYPE_FIELD_NUMBER = 2;
-    private float floatType_;
+    private float floatType_ = 0F;
     /**
      * optional float floatType = 2;
      * @return Whether the floatType field is set.
@@ -443,7 +307,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int INT32TYPE_FIELD_NUMBER = 3;
-    private int int32Type_;
+    private int int32Type_ = 0;
     /**
      * required int32 int32Type = 3;
      * @return Whether the int32Type field is set.
@@ -462,7 +326,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int INT64TYPE_FIELD_NUMBER = 4;
-    private long int64Type_;
+    private long int64Type_ = 0L;
     /**
      * optional int64 int64Type = 4;
      * @return Whether the int64Type field is set.
@@ -481,7 +345,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int UINT32TYPE_FIELD_NUMBER = 5;
-    private int uint32Type_;
+    private int uint32Type_ = 0;
     /**
      * optional uint32 uint32Type = 5;
      * @return Whether the uint32Type field is set.
@@ -500,7 +364,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int UINT64TYPE_FIELD_NUMBER = 6;
-    private long uint64Type_;
+    private long uint64Type_ = 0L;
     /**
      * optional uint64 uint64Type = 6;
      * @return Whether the uint64Type field is set.
@@ -519,7 +383,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int SINT32TYPE_FIELD_NUMBER = 7;
-    private int sint32Type_;
+    private int sint32Type_ = 0;
     /**
      * optional sint32 sint32Type = 7;
      * @return Whether the sint32Type field is set.
@@ -538,7 +402,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int SINT64TYPE_FIELD_NUMBER = 8;
-    private long sint64Type_;
+    private long sint64Type_ = 0L;
     /**
      * optional sint64 sint64Type = 8;
      * @return Whether the sint64Type field is set.
@@ -557,7 +421,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int FIXED32TYPE_FIELD_NUMBER = 9;
-    private int fixed32Type_;
+    private int fixed32Type_ = 0;
     /**
      * optional fixed32 fixed32Type = 9;
      * @return Whether the fixed32Type field is set.
@@ -576,7 +440,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int FIXED64TYPE_FIELD_NUMBER = 10;
-    private long fixed64Type_;
+    private long fixed64Type_ = 0L;
     /**
      * optional fixed64 fixed64Type = 10;
      * @return Whether the fixed64Type field is set.
@@ -595,7 +459,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int SFIXED32TYPE_FIELD_NUMBER = 11;
-    private int sfixed32Type_;
+    private int sfixed32Type_ = 0;
     /**
      * optional sfixed32 sfixed32Type = 11;
      * @return Whether the sfixed32Type field is set.
@@ -614,7 +478,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int SFIXED64TYPE_FIELD_NUMBER = 12;
-    private long sfixed64Type_;
+    private long sfixed64Type_ = 0L;
     /**
      * optional sfixed64 sfixed64Type = 12;
      * @return Whether the sfixed64Type field is set.
@@ -633,7 +497,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int BOOLTYPE_FIELD_NUMBER = 13;
-    private boolean boolType_;
+    private boolean boolType_ = false;
     /**
      * optional bool boolType = 13;
      * @return Whether the boolType field is set.
@@ -652,7 +516,8 @@ public final class Proto2AllTypes {
     }
 
     public static final int STRINGTYPE_FIELD_NUMBER = 14;
-    private volatile Object stringType_;
+    @SuppressWarnings("serial")
+    private volatile java.lang.Object stringType_ = "";
     /**
      * optional string stringType = 14;
      * @return Whether the stringType field is set.
@@ -700,7 +565,7 @@ public final class Proto2AllTypes {
     }
 
     public static final int BYTESTYPE_FIELD_NUMBER = 15;
-    private com.google.protobuf.ByteString bytesType_;
+    private com.google.protobuf.ByteString bytesType_ = com.google.protobuf.ByteString.EMPTY;
     /**
      * optional bytes bytesType = 15;
      * @return Whether the bytesType field is set.
@@ -781,7 +646,7 @@ public final class Proto2AllTypes {
       if (((bitField0_ & 0x00002000) != 0)) {
         output.writeBytes(15, bytesType_);
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @Override
@@ -851,7 +716,7 @@ public final class Proto2AllTypes {
         size += com.google.protobuf.CodedOutputStream
           .computeBytesSize(15, bytesType_);
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -861,10 +726,10 @@ public final class Proto2AllTypes {
       if (obj == this) {
        return true;
       }
-      if (!(obj instanceof AllTypes2)) {
+      if (!(obj instanceof Proto2AllTypes.AllTypes2)) {
         return super.equals(obj);
       }
-      AllTypes2 other = (AllTypes2) obj;
+      Proto2AllTypes.AllTypes2 other = (Proto2AllTypes.AllTypes2) obj;
 
       if (!getDoubleTypeList()
           .equals(other.getDoubleTypeList())) return false;
@@ -939,7 +804,7 @@ public final class Proto2AllTypes {
         if (!getBytesType()
             .equals(other.getBytesType())) return false;
       }
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -1017,74 +882,76 @@ public final class Proto2AllTypes {
         hash = (37 * hash) + BYTESTYPE_FIELD_NUMBER;
         hash = (53 * hash) + getBytesType().hashCode();
       }
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
 
-    public static AllTypes2 parseFrom(
+    public static Proto2AllTypes.AllTypes2 parseFrom(
         java.nio.ByteBuffer data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static AllTypes2 parseFrom(
+    public static Proto2AllTypes.AllTypes2 parseFrom(
         java.nio.ByteBuffer data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static AllTypes2 parseFrom(
+    public static Proto2AllTypes.AllTypes2 parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static AllTypes2 parseFrom(
+    public static Proto2AllTypes.AllTypes2 parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static AllTypes2 parseFrom(byte[] data)
+    public static Proto2AllTypes.AllTypes2 parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static AllTypes2 parseFrom(
+    public static Proto2AllTypes.AllTypes2 parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static AllTypes2 parseFrom(java.io.InputStream input)
+    public static Proto2AllTypes.AllTypes2 parseFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input);
     }
-    public static AllTypes2 parseFrom(
+    public static Proto2AllTypes.AllTypes2 parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
-    public static AllTypes2 parseDelimitedFrom(java.io.InputStream input)
+
+    public static Proto2AllTypes.AllTypes2 parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
-    public static AllTypes2 parseDelimitedFrom(
+
+    public static Proto2AllTypes.AllTypes2 parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
-    public static AllTypes2 parseFrom(
+    public static Proto2AllTypes.AllTypes2 parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input);
     }
-    public static AllTypes2 parseFrom(
+    public static Proto2AllTypes.AllTypes2 parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
@@ -1097,7 +964,7 @@ public final class Proto2AllTypes {
     public static Builder newBuilder() {
       return DEFAULT_INSTANCE.toBuilder();
     }
-    public static Builder newBuilder(AllTypes2 prototype) {
+    public static Builder newBuilder(Proto2AllTypes.AllTypes2 prototype) {
       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
     }
     @Override
@@ -1113,12 +980,12 @@ public final class Proto2AllTypes {
       return builder;
     }
     /**
-     * Protobuf type {@code org.redisson.codec.protobuf.raw.AllTypes2}
+     * Protobuf type {@code AllTypes2}
      */
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageV3.Builder implements
-        // @@protoc_insertion_point(builder_implements:org.redisson.codec.protobuf.raw.AllTypes2)
-        AllTypes2OrBuilder {
+        // @@protoc_insertion_point(builder_implements:AllTypes2)
+        Proto2AllTypes.AllTypes2OrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return Proto2AllTypes.internal_static_org_redisson_codec_protobuf_raw_AllTypes2_descriptor;
@@ -1129,57 +996,38 @@ public final class Proto2AllTypes {
           internalGetFieldAccessorTable() {
         return Proto2AllTypes.internal_static_org_redisson_codec_protobuf_raw_AllTypes2_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                AllTypes2.class, Builder.class);
+                Proto2AllTypes.AllTypes2.class, Proto2AllTypes.AllTypes2.Builder.class);
       }
 
-      // Construct using org.redisson.codec.protobuf.raw.Proto2AllTypes.AllTypes2.newBuilder()
+      // Construct using Proto2AllTypes.AllTypes2.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
+
       }
       @Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         doubleType_ = emptyDoubleList();
-        bitField0_ = (bitField0_ & ~0x00000001);
         floatType_ = 0F;
-        bitField0_ = (bitField0_ & ~0x00000002);
         int32Type_ = 0;
-        bitField0_ = (bitField0_ & ~0x00000004);
         int64Type_ = 0L;
-        bitField0_ = (bitField0_ & ~0x00000008);
         uint32Type_ = 0;
-        bitField0_ = (bitField0_ & ~0x00000010);
         uint64Type_ = 0L;
-        bitField0_ = (bitField0_ & ~0x00000020);
         sint32Type_ = 0;
-        bitField0_ = (bitField0_ & ~0x00000040);
         sint64Type_ = 0L;
-        bitField0_ = (bitField0_ & ~0x00000080);
         fixed32Type_ = 0;
-        bitField0_ = (bitField0_ & ~0x00000100);
         fixed64Type_ = 0L;
-        bitField0_ = (bitField0_ & ~0x00000200);
         sfixed32Type_ = 0;
-        bitField0_ = (bitField0_ & ~0x00000400);
         sfixed64Type_ = 0L;
-        bitField0_ = (bitField0_ & ~0x00000800);
         boolType_ = false;
-        bitField0_ = (bitField0_ & ~0x00001000);
         stringType_ = "";
-        bitField0_ = (bitField0_ & ~0x00002000);
         bytesType_ = com.google.protobuf.ByteString.EMPTY;
-        bitField0_ = (bitField0_ & ~0x00004000);
         return this;
       }
 
@@ -1190,13 +1038,13 @@ public final class Proto2AllTypes {
       }
 
       @Override
-      public AllTypes2 getDefaultInstanceForType() {
-        return AllTypes2.getDefaultInstance();
+      public Proto2AllTypes.AllTypes2 getDefaultInstanceForType() {
+        return Proto2AllTypes.AllTypes2.getDefaultInstance();
       }
 
       @Override
-      public AllTypes2 build() {
-        AllTypes2 result = buildPartial();
+      public Proto2AllTypes.AllTypes2 build() {
+        Proto2AllTypes.AllTypes2 result = buildPartial();
         if (!result.isInitialized()) {
           throw newUninitializedMessageException(result);
         }
@@ -1204,15 +1052,20 @@ public final class Proto2AllTypes {
       }
 
       @Override
-      public AllTypes2 buildPartial() {
-        AllTypes2 result = new AllTypes2(this);
+      public Proto2AllTypes.AllTypes2 buildPartial() {
+        Proto2AllTypes.AllTypes2 result = new Proto2AllTypes.AllTypes2(this);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartial0(Proto2AllTypes.AllTypes2 result) {
         int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((bitField0_ & 0x00000001) != 0)) {
+        if (((from_bitField0_ & 0x00000001) != 0)) {
           doubleType_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000001);
+          result.doubleType_ = doubleType_;
         }
-        result.doubleType_ = doubleType_;
+        int to_bitField0_ = 0;
         if (((from_bitField0_ & 0x00000002) != 0)) {
           result.floatType_ = floatType_;
           to_bitField0_ |= 0x00000001;
@@ -1262,16 +1115,14 @@ public final class Proto2AllTypes {
           to_bitField0_ |= 0x00000800;
         }
         if (((from_bitField0_ & 0x00002000) != 0)) {
+          result.stringType_ = stringType_;
           to_bitField0_ |= 0x00001000;
         }
-        result.stringType_ = stringType_;
         if (((from_bitField0_ & 0x00004000) != 0)) {
+          result.bytesType_ = bytesType_;
           to_bitField0_ |= 0x00002000;
         }
-        result.bytesType_ = bytesType_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
+        result.bitField0_ |= to_bitField0_;
       }
 
       @Override
@@ -1308,20 +1159,21 @@ public final class Proto2AllTypes {
       }
       @Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof AllTypes2) {
-          return mergeFrom((AllTypes2)other);
+        if (other instanceof Proto2AllTypes.AllTypes2) {
+          return mergeFrom((Proto2AllTypes.AllTypes2)other);
         } else {
           super.mergeFrom(other);
           return this;
         }
       }
 
-      public Builder mergeFrom(AllTypes2 other) {
-        if (other == AllTypes2.getDefaultInstance()) return this;
+      public Builder mergeFrom(Proto2AllTypes.AllTypes2 other) {
+        if (other == Proto2AllTypes.AllTypes2.getDefaultInstance()) return this;
         if (!other.doubleType_.isEmpty()) {
           if (doubleType_.isEmpty()) {
             doubleType_ = other.doubleType_;
-            bitField0_ = (bitField0_ & ~0x00000001);
+            doubleType_.makeImmutable();
+            bitField0_ |= 0x00000001;
           } else {
             ensureDoubleTypeIsMutable();
             doubleType_.addAll(other.doubleType_);
@@ -1365,14 +1217,14 @@ public final class Proto2AllTypes {
           setBoolType(other.getBoolType());
         }
         if (other.hasStringType()) {
-          bitField0_ |= 0x00002000;
           stringType_ = other.stringType_;
+          bitField0_ |= 0x00002000;
           onChanged();
         }
         if (other.hasBytesType()) {
           setBytesType(other.getBytesType());
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -1390,27 +1242,133 @@ public final class Proto2AllTypes {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        AllTypes2 parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new 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();
+                ensureDoubleTypeIsMutable();
+                doubleType_.addDouble(v);
+                break;
+              } // case 9
+              case 10: {
+                int length = input.readRawVarint32();
+                int limit = input.pushLimit(length);
+                int alloc = length > 4096 ? 4096 : length;
+                ensureDoubleTypeIsMutable(alloc / 8);
+                while (input.getBytesUntilLimit() > 0) {
+                  doubleType_.addDouble(input.readDouble());
+                }
+                input.popLimit(limit);
+                break;
+              } // case 10
+              case 21: {
+                floatType_ = input.readFloat();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 21
+              case 24: {
+                int32Type_ = input.readInt32();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 24
+              case 32: {
+                int64Type_ = input.readInt64();
+                bitField0_ |= 0x00000008;
+                break;
+              } // case 32
+              case 40: {
+                uint32Type_ = input.readUInt32();
+                bitField0_ |= 0x00000010;
+                break;
+              } // case 40
+              case 48: {
+                uint64Type_ = input.readUInt64();
+                bitField0_ |= 0x00000020;
+                break;
+              } // case 48
+              case 56: {
+                sint32Type_ = input.readSInt32();
+                bitField0_ |= 0x00000040;
+                break;
+              } // case 56
+              case 64: {
+                sint64Type_ = input.readSInt64();
+                bitField0_ |= 0x00000080;
+                break;
+              } // case 64
+              case 77: {
+                fixed32Type_ = input.readFixed32();
+                bitField0_ |= 0x00000100;
+                break;
+              } // case 77
+              case 81: {
+                fixed64Type_ = input.readFixed64();
+                bitField0_ |= 0x00000200;
+                break;
+              } // case 81
+              case 93: {
+                sfixed32Type_ = input.readSFixed32();
+                bitField0_ |= 0x00000400;
+                break;
+              } // case 93
+              case 97: {
+                sfixed64Type_ = input.readSFixed64();
+                bitField0_ |= 0x00000800;
+                break;
+              } // case 97
+              case 104: {
+                boolType_ = input.readBool();
+                bitField0_ |= 0x00001000;
+                break;
+              } // case 104
+              case 114: {
+                stringType_ = input.readBytes();
+                bitField0_ |= 0x00002000;
+                break;
+              } // case 114
+              case 122: {
+                bytesType_ = input.readBytes();
+                bitField0_ |= 0x00004000;
+                break;
+              } // case 122
+              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 = (AllTypes2) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
 
       private com.google.protobuf.Internal.DoubleList doubleType_ = emptyDoubleList();
       private void ensureDoubleTypeIsMutable() {
-        if (!((bitField0_ & 0x00000001) != 0)) {
-          doubleType_ = mutableCopy(doubleType_);
-          bitField0_ |= 0x00000001;
-         }
+        if (!doubleType_.isModifiable()) {
+          doubleType_ = makeMutableCopy(doubleType_);
+        }
+        bitField0_ |= 0x00000001;
+      }
+      private void ensureDoubleTypeIsMutable(int capacity) {
+        if (!doubleType_.isModifiable()) {
+          doubleType_ = makeMutableCopy(doubleType_, capacity);
+        }
+        bitField0_ |= 0x00000001;
       }
       /**
        * 
@@ -1422,8 +1380,8 @@ public final class Proto2AllTypes {
        */
       public java.util.List
           getDoubleTypeList() {
-        return ((bitField0_ & 0x00000001) != 0) ?
-                 java.util.Collections.unmodifiableList(doubleType_) : doubleType_;
+        doubleType_.makeImmutable();
+        return doubleType_;
       }
       /**
        * 
@@ -1460,8 +1418,10 @@ public final class Proto2AllTypes {
        */
       public Builder setDoubleType(
           int index, double value) {
+
         ensureDoubleTypeIsMutable();
         doubleType_.setDouble(index, value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -1475,8 +1435,10 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder addDoubleType(double value) {
+
         ensureDoubleTypeIsMutable();
         doubleType_.addDouble(value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -1494,6 +1456,7 @@ public final class Proto2AllTypes {
         ensureDoubleTypeIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, doubleType_);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -1535,8 +1498,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setFloatType(float value) {
-        bitField0_ |= 0x00000002;
+
         floatType_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
@@ -1574,8 +1538,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setInt32Type(int value) {
-        bitField0_ |= 0x00000004;
+
         int32Type_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -1613,8 +1578,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setInt64Type(long value) {
-        bitField0_ |= 0x00000008;
+
         int64Type_ = value;
+        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -1652,8 +1618,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setUint32Type(int value) {
-        bitField0_ |= 0x00000010;
+
         uint32Type_ = value;
+        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -1691,8 +1658,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setUint64Type(long value) {
-        bitField0_ |= 0x00000020;
+
         uint64Type_ = value;
+        bitField0_ |= 0x00000020;
         onChanged();
         return this;
       }
@@ -1730,8 +1698,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setSint32Type(int value) {
-        bitField0_ |= 0x00000040;
+
         sint32Type_ = value;
+        bitField0_ |= 0x00000040;
         onChanged();
         return this;
       }
@@ -1769,8 +1738,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setSint64Type(long value) {
-        bitField0_ |= 0x00000080;
+
         sint64Type_ = value;
+        bitField0_ |= 0x00000080;
         onChanged();
         return this;
       }
@@ -1808,8 +1778,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setFixed32Type(int value) {
-        bitField0_ |= 0x00000100;
+
         fixed32Type_ = value;
+        bitField0_ |= 0x00000100;
         onChanged();
         return this;
       }
@@ -1847,8 +1818,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setFixed64Type(long value) {
-        bitField0_ |= 0x00000200;
+
         fixed64Type_ = value;
+        bitField0_ |= 0x00000200;
         onChanged();
         return this;
       }
@@ -1886,8 +1858,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setSfixed32Type(int value) {
-        bitField0_ |= 0x00000400;
+
         sfixed32Type_ = value;
+        bitField0_ |= 0x00000400;
         onChanged();
         return this;
       }
@@ -1925,8 +1898,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setSfixed64Type(long value) {
-        bitField0_ |= 0x00000800;
+
         sfixed64Type_ = value;
+        bitField0_ |= 0x00000800;
         onChanged();
         return this;
       }
@@ -1964,8 +1938,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setBoolType(boolean value) {
-        bitField0_ |= 0x00001000;
+
         boolType_ = value;
+        bitField0_ |= 0x00001000;
         onChanged();
         return this;
       }
@@ -2030,11 +2005,9 @@ public final class Proto2AllTypes {
        */
       public Builder setStringType(
           String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00002000;
+        if (value == null) { throw new NullPointerException(); }
         stringType_ = value;
+        bitField0_ |= 0x00002000;
         onChanged();
         return this;
       }
@@ -2043,8 +2016,8 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearStringType() {
-        bitField0_ = (bitField0_ & ~0x00002000);
         stringType_ = getDefaultInstance().getStringType();
+        bitField0_ = (bitField0_ & ~0x00002000);
         onChanged();
         return this;
       }
@@ -2055,11 +2028,9 @@ public final class Proto2AllTypes {
        */
       public Builder setStringTypeBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00002000;
+        if (value == null) { throw new NullPointerException(); }
         stringType_ = value;
+        bitField0_ |= 0x00002000;
         onChanged();
         return this;
       }
@@ -2087,11 +2058,9 @@ public final class Proto2AllTypes {
        * @return This builder for chaining.
        */
       public Builder setBytesType(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  bitField0_ |= 0x00004000;
+        if (value == null) { throw new NullPointerException(); }
         bytesType_ = value;
+        bitField0_ |= 0x00004000;
         onChanged();
         return this;
       }
@@ -2118,16 +2087,16 @@ public final class Proto2AllTypes {
       }
 
 
-      // @@protoc_insertion_point(builder_scope:org.redisson.codec.protobuf.raw.AllTypes2)
+      // @@protoc_insertion_point(builder_scope:AllTypes2)
     }
 
-    // @@protoc_insertion_point(class_scope:org.redisson.codec.protobuf.raw.AllTypes2)
-    private static final AllTypes2 DEFAULT_INSTANCE;
+    // @@protoc_insertion_point(class_scope:AllTypes2)
+    private static final Proto2AllTypes.AllTypes2 DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new AllTypes2();
+      DEFAULT_INSTANCE = new Proto2AllTypes.AllTypes2();
     }
 
-    public static AllTypes2 getDefaultInstance() {
+    public static Proto2AllTypes.AllTypes2 getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
@@ -2138,7 +2107,18 @@ public final class Proto2AllTypes {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new AllTypes2(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();
       }
     };
 
@@ -2152,7 +2132,7 @@ public final class Proto2AllTypes {
     }
 
     @Override
-    public AllTypes2 getDefaultInstanceForType() {
+    public Proto2AllTypes.AllTypes2 getDefaultInstanceForType() {
       return DEFAULT_INSTANCE;
     }
 
diff --git a/redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto3AllTypes.java b/redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto3AllTypes.java
index aaef272a8..8c632f1ed 100644
--- a/redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto3AllTypes.java
+++ b/redisson/src/test/java/org/redisson/codec/protobuf/nativeData/Proto3AllTypes.java
@@ -48,12 +48,12 @@ public final class Proto3AllTypes {
     double getDoubleType(int index);
 
     /**
-     * float floatType = 2;
+     * optional float floatType = 2;
      * @return Whether the floatType field is set.
      */
     boolean hasFloatType();
     /**
-     * float floatType = 2;
+     * optional float floatType = 2;
      * @return The floatType.
      */
     float getFloatType();
@@ -167,144 +167,6 @@ public final class Proto3AllTypes {
       return new AllTypes3();
     }
 
-    @Override
-    public final com.google.protobuf.UnknownFieldSet
-    getUnknownFields() {
-      return this.unknownFields;
-    }
-    private AllTypes3(
-        com.google.protobuf.CodedInputStream input,
-        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-        throws com.google.protobuf.InvalidProtocolBufferException {
-      this();
-      if (extensionRegistry == null) {
-        throw new 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)) {
-                doubleType_ = newDoubleList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              doubleType_.addDouble(input.readDouble());
-              break;
-            }
-            case 10: {
-              int length = input.readRawVarint32();
-              int limit = input.pushLimit(length);
-              if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
-                doubleType_ = newDoubleList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              while (input.getBytesUntilLimit() > 0) {
-                doubleType_.addDouble(input.readDouble());
-              }
-              input.popLimit(limit);
-              break;
-            }
-            case 21: {
-              bitField0_ |= 0x00000001;
-              floatType_ = input.readFloat();
-              break;
-            }
-            case 24: {
-
-              int32Type_ = input.readInt32();
-              break;
-            }
-            case 32: {
-
-              int64Type_ = input.readInt64();
-              break;
-            }
-            case 40: {
-
-              uint32Type_ = input.readUInt32();
-              break;
-            }
-            case 48: {
-
-              uint64Type_ = input.readUInt64();
-              break;
-            }
-            case 56: {
-
-              sint32Type_ = input.readSInt32();
-              break;
-            }
-            case 64: {
-
-              sint64Type_ = input.readSInt64();
-              break;
-            }
-            case 77: {
-
-              fixed32Type_ = input.readFixed32();
-              break;
-            }
-            case 81: {
-
-              fixed64Type_ = input.readFixed64();
-              break;
-            }
-            case 93: {
-
-              sfixed32Type_ = input.readSFixed32();
-              break;
-            }
-            case 97: {
-
-              sfixed64Type_ = input.readSFixed64();
-              break;
-            }
-            case 104: {
-
-              boolType_ = input.readBool();
-              break;
-            }
-            case 114: {
-              String s = input.readStringRequireUtf8();
-
-              stringType_ = s;
-              break;
-            }
-            case 122: {
-
-              bytesType_ = input.readBytes();
-              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)) {
-          doubleType_.makeImmutable(); // C
-        }
-        this.unknownFields = unknownFields.build();
-        makeExtensionsImmutable();
-      }
-    }
     public static final com.google.protobuf.Descriptors.Descriptor
         getDescriptor() {
       return Proto3AllTypes.internal_static_org_redisson_codec_protobuf_raw_AllTypes3_descriptor;
@@ -315,12 +177,14 @@ public final class Proto3AllTypes {
         internalGetFieldAccessorTable() {
       return Proto3AllTypes.internal_static_org_redisson_codec_protobuf_raw_AllTypes3_fieldAccessorTable
           .ensureFieldAccessorsInitialized(
-              AllTypes3.class, Builder.class);
+              Proto3AllTypes.AllTypes3.class, Proto3AllTypes.AllTypes3.Builder.class);
     }
 
     private int bitField0_;
     public static final int DOUBLETYPE_FIELD_NUMBER = 1;
-    private com.google.protobuf.Internal.DoubleList doubleType_;
+    @SuppressWarnings("serial")
+    private com.google.protobuf.Internal.DoubleList doubleType_ =
+        emptyDoubleList();
     /**
      * 
      *types from https://protobuf.dev/programming-guides/proto3/
@@ -360,9 +224,9 @@ public final class Proto3AllTypes {
     private int doubleTypeMemoizedSerializedSize = -1;
 
     public static final int FLOATTYPE_FIELD_NUMBER = 2;
-    private float floatType_;
+    private float floatType_ = 0F;
     /**
-     * float floatType = 2;
+     * optional float floatType = 2;
      * @return Whether the floatType field is set.
      */
     @Override
@@ -370,7 +234,7 @@ public final class Proto3AllTypes {
       return ((bitField0_ & 0x00000001) != 0);
     }
     /**
-     * float floatType = 2;
+     * optional float floatType = 2;
      * @return The floatType.
      */
     @Override
@@ -379,7 +243,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int INT32TYPE_FIELD_NUMBER = 3;
-    private int int32Type_;
+    private int int32Type_ = 0;
     /**
      * int32 int32Type = 3;
      * @return The int32Type.
@@ -390,7 +254,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int INT64TYPE_FIELD_NUMBER = 4;
-    private long int64Type_;
+    private long int64Type_ = 0L;
     /**
      * int64 int64Type = 4;
      * @return The int64Type.
@@ -401,7 +265,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int UINT32TYPE_FIELD_NUMBER = 5;
-    private int uint32Type_;
+    private int uint32Type_ = 0;
     /**
      * uint32 uint32Type = 5;
      * @return The uint32Type.
@@ -412,7 +276,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int UINT64TYPE_FIELD_NUMBER = 6;
-    private long uint64Type_;
+    private long uint64Type_ = 0L;
     /**
      * uint64 uint64Type = 6;
      * @return The uint64Type.
@@ -423,7 +287,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int SINT32TYPE_FIELD_NUMBER = 7;
-    private int sint32Type_;
+    private int sint32Type_ = 0;
     /**
      * sint32 sint32Type = 7;
      * @return The sint32Type.
@@ -434,7 +298,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int SINT64TYPE_FIELD_NUMBER = 8;
-    private long sint64Type_;
+    private long sint64Type_ = 0L;
     /**
      * sint64 sint64Type = 8;
      * @return The sint64Type.
@@ -445,7 +309,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int FIXED32TYPE_FIELD_NUMBER = 9;
-    private int fixed32Type_;
+    private int fixed32Type_ = 0;
     /**
      * fixed32 fixed32Type = 9;
      * @return The fixed32Type.
@@ -456,7 +320,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int FIXED64TYPE_FIELD_NUMBER = 10;
-    private long fixed64Type_;
+    private long fixed64Type_ = 0L;
     /**
      * fixed64 fixed64Type = 10;
      * @return The fixed64Type.
@@ -467,7 +331,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int SFIXED32TYPE_FIELD_NUMBER = 11;
-    private int sfixed32Type_;
+    private int sfixed32Type_ = 0;
     /**
      * sfixed32 sfixed32Type = 11;
      * @return The sfixed32Type.
@@ -478,7 +342,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int SFIXED64TYPE_FIELD_NUMBER = 12;
-    private long sfixed64Type_;
+    private long sfixed64Type_ = 0L;
     /**
      * sfixed64 sfixed64Type = 12;
      * @return The sfixed64Type.
@@ -489,7 +353,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int BOOLTYPE_FIELD_NUMBER = 13;
-    private boolean boolType_;
+    private boolean boolType_ = false;
     /**
      * bool boolType = 13;
      * @return The boolType.
@@ -500,7 +364,8 @@ public final class Proto3AllTypes {
     }
 
     public static final int STRINGTYPE_FIELD_NUMBER = 14;
-    private volatile Object stringType_;
+    @SuppressWarnings("serial")
+    private volatile Object stringType_ = "";
     /**
      * string stringType = 14;
      * @return The stringType.
@@ -538,7 +403,7 @@ public final class Proto3AllTypes {
     }
 
     public static final int BYTESTYPE_FIELD_NUMBER = 15;
-    private com.google.protobuf.ByteString bytesType_;
+    private com.google.protobuf.ByteString bytesType_ = com.google.protobuf.ByteString.EMPTY;
     /**
      * bytes bytesType = 15;
      * @return The bytesType.
@@ -606,13 +471,13 @@ public final class Proto3AllTypes {
       if (boolType_ != false) {
         output.writeBool(13, boolType_);
       }
-      if (!getStringTypeBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringType_)) {
         com.google.protobuf.GeneratedMessageV3.writeString(output, 14, stringType_);
       }
       if (!bytesType_.isEmpty()) {
         output.writeBytes(15, bytesType_);
       }
-      unknownFields.writeTo(output);
+      getUnknownFields().writeTo(output);
     }
 
     @Override
@@ -680,14 +545,14 @@ public final class Proto3AllTypes {
         size += com.google.protobuf.CodedOutputStream
           .computeBoolSize(13, boolType_);
       }
-      if (!getStringTypeBytes().isEmpty()) {
+      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(stringType_)) {
         size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, stringType_);
       }
       if (!bytesType_.isEmpty()) {
         size += com.google.protobuf.CodedOutputStream
           .computeBytesSize(15, bytesType_);
       }
-      size += unknownFields.getSerializedSize();
+      size += getUnknownFields().getSerializedSize();
       memoizedSize = size;
       return size;
     }
@@ -697,10 +562,10 @@ public final class Proto3AllTypes {
       if (obj == this) {
        return true;
       }
-      if (!(obj instanceof AllTypes3)) {
+      if (!(obj instanceof Proto3AllTypes.AllTypes3)) {
         return super.equals(obj);
       }
-      AllTypes3 other = (AllTypes3) obj;
+      Proto3AllTypes.AllTypes3 other = (Proto3AllTypes.AllTypes3) obj;
 
       if (!getDoubleTypeList()
           .equals(other.getDoubleTypeList())) return false;
@@ -736,7 +601,7 @@ public final class Proto3AllTypes {
           .equals(other.getStringType())) return false;
       if (!getBytesType()
           .equals(other.getBytesType())) return false;
-      if (!unknownFields.equals(other.unknownFields)) return false;
+      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
       return true;
     }
 
@@ -788,74 +653,76 @@ public final class Proto3AllTypes {
       hash = (53 * hash) + getStringType().hashCode();
       hash = (37 * hash) + BYTESTYPE_FIELD_NUMBER;
       hash = (53 * hash) + getBytesType().hashCode();
-      hash = (29 * hash) + unknownFields.hashCode();
+      hash = (29 * hash) + getUnknownFields().hashCode();
       memoizedHashCode = hash;
       return hash;
     }
 
-    public static AllTypes3 parseFrom(
+    public static Proto3AllTypes.AllTypes3 parseFrom(
         java.nio.ByteBuffer data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static AllTypes3 parseFrom(
+    public static Proto3AllTypes.AllTypes3 parseFrom(
         java.nio.ByteBuffer data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static AllTypes3 parseFrom(
+    public static Proto3AllTypes.AllTypes3 parseFrom(
         com.google.protobuf.ByteString data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static AllTypes3 parseFrom(
+    public static Proto3AllTypes.AllTypes3 parseFrom(
         com.google.protobuf.ByteString data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static AllTypes3 parseFrom(byte[] data)
+    public static Proto3AllTypes.AllTypes3 parseFrom(byte[] data)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data);
     }
-    public static AllTypes3 parseFrom(
+    public static Proto3AllTypes.AllTypes3 parseFrom(
         byte[] data,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws com.google.protobuf.InvalidProtocolBufferException {
       return PARSER.parseFrom(data, extensionRegistry);
     }
-    public static AllTypes3 parseFrom(java.io.InputStream input)
+    public static Proto3AllTypes.AllTypes3 parseFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input);
     }
-    public static AllTypes3 parseFrom(
+    public static Proto3AllTypes.AllTypes3 parseFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input, extensionRegistry);
     }
-    public static AllTypes3 parseDelimitedFrom(java.io.InputStream input)
+
+    public static Proto3AllTypes.AllTypes3 parseDelimitedFrom(java.io.InputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input);
     }
-    public static AllTypes3 parseDelimitedFrom(
+
+    public static Proto3AllTypes.AllTypes3 parseDelimitedFrom(
         java.io.InputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
     }
-    public static AllTypes3 parseFrom(
+    public static Proto3AllTypes.AllTypes3 parseFrom(
         com.google.protobuf.CodedInputStream input)
         throws java.io.IOException {
       return com.google.protobuf.GeneratedMessageV3
           .parseWithIOException(PARSER, input);
     }
-    public static AllTypes3 parseFrom(
+    public static Proto3AllTypes.AllTypes3 parseFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
@@ -868,7 +735,7 @@ public final class Proto3AllTypes {
     public static Builder newBuilder() {
       return DEFAULT_INSTANCE.toBuilder();
     }
-    public static Builder newBuilder(AllTypes3 prototype) {
+    public static Builder newBuilder(Proto3AllTypes.AllTypes3 prototype) {
       return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
     }
     @Override
@@ -889,7 +756,7 @@ public final class Proto3AllTypes {
     public static final class Builder extends
         com.google.protobuf.GeneratedMessageV3.Builder implements
         // @@protoc_insertion_point(builder_implements:org.redisson.codec.protobuf.raw.AllTypes3)
-        AllTypes3OrBuilder {
+        Proto3AllTypes.AllTypes3OrBuilder {
       public static final com.google.protobuf.Descriptors.Descriptor
           getDescriptor() {
         return Proto3AllTypes.internal_static_org_redisson_codec_protobuf_raw_AllTypes3_descriptor;
@@ -900,57 +767,38 @@ public final class Proto3AllTypes {
           internalGetFieldAccessorTable() {
         return Proto3AllTypes.internal_static_org_redisson_codec_protobuf_raw_AllTypes3_fieldAccessorTable
             .ensureFieldAccessorsInitialized(
-                AllTypes3.class, Builder.class);
+                Proto3AllTypes.AllTypes3.class, Proto3AllTypes.AllTypes3.Builder.class);
       }
 
-      // Construct using org.redisson.codec.protobuf.raw.Proto3AllTypes.AllTypes3.newBuilder()
+      // Construct using org.redisson.codec.protobuf.nativeData.Proto3AllTypes.AllTypes3.newBuilder()
       private Builder() {
-        maybeForceBuilderInitialization();
+
       }
 
       private Builder(
           com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
         super(parent);
-        maybeForceBuilderInitialization();
-      }
-      private void maybeForceBuilderInitialization() {
-        if (com.google.protobuf.GeneratedMessageV3
-                .alwaysUseFieldBuilders) {
-        }
+
       }
       @Override
       public Builder clear() {
         super.clear();
+        bitField0_ = 0;
         doubleType_ = emptyDoubleList();
-        bitField0_ = (bitField0_ & ~0x00000001);
         floatType_ = 0F;
-        bitField0_ = (bitField0_ & ~0x00000002);
         int32Type_ = 0;
-
         int64Type_ = 0L;
-
         uint32Type_ = 0;
-
         uint64Type_ = 0L;
-
         sint32Type_ = 0;
-
         sint64Type_ = 0L;
-
         fixed32Type_ = 0;
-
         fixed64Type_ = 0L;
-
         sfixed32Type_ = 0;
-
         sfixed64Type_ = 0L;
-
         boolType_ = false;
-
         stringType_ = "";
-
         bytesType_ = com.google.protobuf.ByteString.EMPTY;
-
         return this;
       }
 
@@ -961,13 +809,13 @@ public final class Proto3AllTypes {
       }
 
       @Override
-      public AllTypes3 getDefaultInstanceForType() {
-        return AllTypes3.getDefaultInstance();
+      public Proto3AllTypes.AllTypes3 getDefaultInstanceForType() {
+        return Proto3AllTypes.AllTypes3.getDefaultInstance();
       }
 
       @Override
-      public AllTypes3 build() {
-        AllTypes3 result = buildPartial();
+      public Proto3AllTypes.AllTypes3 build() {
+        Proto3AllTypes.AllTypes3 result = buildPartial();
         if (!result.isInitialized()) {
           throw newUninitializedMessageException(result);
         }
@@ -975,35 +823,64 @@ public final class Proto3AllTypes {
       }
 
       @Override
-      public AllTypes3 buildPartial() {
-        AllTypes3 result = new AllTypes3(this);
+      public Proto3AllTypes.AllTypes3 buildPartial() {
+        Proto3AllTypes.AllTypes3 result = new Proto3AllTypes.AllTypes3(this);
+        if (bitField0_ != 0) { buildPartial0(result); }
+        onBuilt();
+        return result;
+      }
+
+      private void buildPartial0(Proto3AllTypes.AllTypes3 result) {
         int from_bitField0_ = bitField0_;
-        int to_bitField0_ = 0;
-        if (((bitField0_ & 0x00000001) != 0)) {
+        if (((from_bitField0_ & 0x00000001) != 0)) {
           doubleType_.makeImmutable();
-          bitField0_ = (bitField0_ & ~0x00000001);
+          result.doubleType_ = doubleType_;
         }
-        result.doubleType_ = doubleType_;
+        int to_bitField0_ = 0;
         if (((from_bitField0_ & 0x00000002) != 0)) {
           result.floatType_ = floatType_;
           to_bitField0_ |= 0x00000001;
         }
-        result.int32Type_ = int32Type_;
-        result.int64Type_ = int64Type_;
-        result.uint32Type_ = uint32Type_;
-        result.uint64Type_ = uint64Type_;
-        result.sint32Type_ = sint32Type_;
-        result.sint64Type_ = sint64Type_;
-        result.fixed32Type_ = fixed32Type_;
-        result.fixed64Type_ = fixed64Type_;
-        result.sfixed32Type_ = sfixed32Type_;
-        result.sfixed64Type_ = sfixed64Type_;
-        result.boolType_ = boolType_;
-        result.stringType_ = stringType_;
-        result.bytesType_ = bytesType_;
-        result.bitField0_ = to_bitField0_;
-        onBuilt();
-        return result;
+        if (((from_bitField0_ & 0x00000004) != 0)) {
+          result.int32Type_ = int32Type_;
+        }
+        if (((from_bitField0_ & 0x00000008) != 0)) {
+          result.int64Type_ = int64Type_;
+        }
+        if (((from_bitField0_ & 0x00000010) != 0)) {
+          result.uint32Type_ = uint32Type_;
+        }
+        if (((from_bitField0_ & 0x00000020) != 0)) {
+          result.uint64Type_ = uint64Type_;
+        }
+        if (((from_bitField0_ & 0x00000040) != 0)) {
+          result.sint32Type_ = sint32Type_;
+        }
+        if (((from_bitField0_ & 0x00000080) != 0)) {
+          result.sint64Type_ = sint64Type_;
+        }
+        if (((from_bitField0_ & 0x00000100) != 0)) {
+          result.fixed32Type_ = fixed32Type_;
+        }
+        if (((from_bitField0_ & 0x00000200) != 0)) {
+          result.fixed64Type_ = fixed64Type_;
+        }
+        if (((from_bitField0_ & 0x00000400) != 0)) {
+          result.sfixed32Type_ = sfixed32Type_;
+        }
+        if (((from_bitField0_ & 0x00000800) != 0)) {
+          result.sfixed64Type_ = sfixed64Type_;
+        }
+        if (((from_bitField0_ & 0x00001000) != 0)) {
+          result.boolType_ = boolType_;
+        }
+        if (((from_bitField0_ & 0x00002000) != 0)) {
+          result.stringType_ = stringType_;
+        }
+        if (((from_bitField0_ & 0x00004000) != 0)) {
+          result.bytesType_ = bytesType_;
+        }
+        result.bitField0_ |= to_bitField0_;
       }
 
       @Override
@@ -1040,20 +917,21 @@ public final class Proto3AllTypes {
       }
       @Override
       public Builder mergeFrom(com.google.protobuf.Message other) {
-        if (other instanceof AllTypes3) {
-          return mergeFrom((AllTypes3)other);
+        if (other instanceof Proto3AllTypes.AllTypes3) {
+          return mergeFrom((Proto3AllTypes.AllTypes3)other);
         } else {
           super.mergeFrom(other);
           return this;
         }
       }
 
-      public Builder mergeFrom(AllTypes3 other) {
-        if (other == AllTypes3.getDefaultInstance()) return this;
+      public Builder mergeFrom(Proto3AllTypes.AllTypes3 other) {
+        if (other == Proto3AllTypes.AllTypes3.getDefaultInstance()) return this;
         if (!other.doubleType_.isEmpty()) {
           if (doubleType_.isEmpty()) {
             doubleType_ = other.doubleType_;
-            bitField0_ = (bitField0_ & ~0x00000001);
+            doubleType_.makeImmutable();
+            bitField0_ |= 0x00000001;
           } else {
             ensureDoubleTypeIsMutable();
             doubleType_.addAll(other.doubleType_);
@@ -1098,12 +976,13 @@ public final class Proto3AllTypes {
         }
         if (!other.getStringType().isEmpty()) {
           stringType_ = other.stringType_;
+          bitField0_ |= 0x00002000;
           onChanged();
         }
         if (other.getBytesType() != com.google.protobuf.ByteString.EMPTY) {
           setBytesType(other.getBytesType());
         }
-        this.mergeUnknownFields(other.unknownFields);
+        this.mergeUnknownFields(other.getUnknownFields());
         onChanged();
         return this;
       }
@@ -1118,27 +997,133 @@ public final class Proto3AllTypes {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws java.io.IOException {
-        AllTypes3 parsedMessage = null;
+        if (extensionRegistry == null) {
+          throw new 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();
+                ensureDoubleTypeIsMutable();
+                doubleType_.addDouble(v);
+                break;
+              } // case 9
+              case 10: {
+                int length = input.readRawVarint32();
+                int limit = input.pushLimit(length);
+                int alloc = length > 4096 ? 4096 : length;
+                ensureDoubleTypeIsMutable(alloc / 8);
+                while (input.getBytesUntilLimit() > 0) {
+                  doubleType_.addDouble(input.readDouble());
+                }
+                input.popLimit(limit);
+                break;
+              } // case 10
+              case 21: {
+                floatType_ = input.readFloat();
+                bitField0_ |= 0x00000002;
+                break;
+              } // case 21
+              case 24: {
+                int32Type_ = input.readInt32();
+                bitField0_ |= 0x00000004;
+                break;
+              } // case 24
+              case 32: {
+                int64Type_ = input.readInt64();
+                bitField0_ |= 0x00000008;
+                break;
+              } // case 32
+              case 40: {
+                uint32Type_ = input.readUInt32();
+                bitField0_ |= 0x00000010;
+                break;
+              } // case 40
+              case 48: {
+                uint64Type_ = input.readUInt64();
+                bitField0_ |= 0x00000020;
+                break;
+              } // case 48
+              case 56: {
+                sint32Type_ = input.readSInt32();
+                bitField0_ |= 0x00000040;
+                break;
+              } // case 56
+              case 64: {
+                sint64Type_ = input.readSInt64();
+                bitField0_ |= 0x00000080;
+                break;
+              } // case 64
+              case 77: {
+                fixed32Type_ = input.readFixed32();
+                bitField0_ |= 0x00000100;
+                break;
+              } // case 77
+              case 81: {
+                fixed64Type_ = input.readFixed64();
+                bitField0_ |= 0x00000200;
+                break;
+              } // case 81
+              case 93: {
+                sfixed32Type_ = input.readSFixed32();
+                bitField0_ |= 0x00000400;
+                break;
+              } // case 93
+              case 97: {
+                sfixed64Type_ = input.readSFixed64();
+                bitField0_ |= 0x00000800;
+                break;
+              } // case 97
+              case 104: {
+                boolType_ = input.readBool();
+                bitField0_ |= 0x00001000;
+                break;
+              } // case 104
+              case 114: {
+                stringType_ = input.readStringRequireUtf8();
+                bitField0_ |= 0x00002000;
+                break;
+              } // case 114
+              case 122: {
+                bytesType_ = input.readBytes();
+                bitField0_ |= 0x00004000;
+                break;
+              } // case 122
+              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 = (AllTypes3) e.getUnfinishedMessage();
           throw e.unwrapIOException();
         } finally {
-          if (parsedMessage != null) {
-            mergeFrom(parsedMessage);
-          }
-        }
+          onChanged();
+        } // finally
         return this;
       }
       private int bitField0_;
 
       private com.google.protobuf.Internal.DoubleList doubleType_ = emptyDoubleList();
       private void ensureDoubleTypeIsMutable() {
-        if (!((bitField0_ & 0x00000001) != 0)) {
-          doubleType_ = mutableCopy(doubleType_);
-          bitField0_ |= 0x00000001;
-         }
+        if (!doubleType_.isModifiable()) {
+          doubleType_ = makeMutableCopy(doubleType_);
+        }
+        bitField0_ |= 0x00000001;
+      }
+      private void ensureDoubleTypeIsMutable(int capacity) {
+        if (!doubleType_.isModifiable()) {
+          doubleType_ = makeMutableCopy(doubleType_, capacity);
+        }
+        bitField0_ |= 0x00000001;
       }
       /**
        * 
@@ -1150,8 +1135,8 @@ public final class Proto3AllTypes {
        */
       public java.util.List
           getDoubleTypeList() {
-        return ((bitField0_ & 0x00000001) != 0) ?
-                 java.util.Collections.unmodifiableList(doubleType_) : doubleType_;
+        doubleType_.makeImmutable();
+        return doubleType_;
       }
       /**
        * 
@@ -1188,8 +1173,10 @@ public final class Proto3AllTypes {
        */
       public Builder setDoubleType(
           int index, double value) {
+
         ensureDoubleTypeIsMutable();
         doubleType_.setDouble(index, value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -1203,8 +1190,10 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder addDoubleType(double value) {
+
         ensureDoubleTypeIsMutable();
         doubleType_.addDouble(value);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -1222,6 +1211,7 @@ public final class Proto3AllTypes {
         ensureDoubleTypeIsMutable();
         com.google.protobuf.AbstractMessageLite.Builder.addAll(
             values, doubleType_);
+        bitField0_ |= 0x00000001;
         onChanged();
         return this;
       }
@@ -1242,7 +1232,7 @@ public final class Proto3AllTypes {
 
       private float floatType_ ;
       /**
-       * float floatType = 2;
+       * optional float floatType = 2;
        * @return Whether the floatType field is set.
        */
       @Override
@@ -1250,7 +1240,7 @@ public final class Proto3AllTypes {
         return ((bitField0_ & 0x00000002) != 0);
       }
       /**
-       * float floatType = 2;
+       * optional float floatType = 2;
        * @return The floatType.
        */
       @Override
@@ -1258,18 +1248,19 @@ public final class Proto3AllTypes {
         return floatType_;
       }
       /**
-       * float floatType = 2;
+       * optional float floatType = 2;
        * @param value The floatType to set.
        * @return This builder for chaining.
        */
       public Builder setFloatType(float value) {
-        bitField0_ |= 0x00000002;
+
         floatType_ = value;
+        bitField0_ |= 0x00000002;
         onChanged();
         return this;
       }
       /**
-       * float floatType = 2;
+       * optional float floatType = 2;
        * @return This builder for chaining.
        */
       public Builder clearFloatType() {
@@ -1294,8 +1285,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setInt32Type(int value) {
-        
+
         int32Type_ = value;
+        bitField0_ |= 0x00000004;
         onChanged();
         return this;
       }
@@ -1304,7 +1296,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearInt32Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000004);
         int32Type_ = 0;
         onChanged();
         return this;
@@ -1325,8 +1317,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setInt64Type(long value) {
-        
+
         int64Type_ = value;
+        bitField0_ |= 0x00000008;
         onChanged();
         return this;
       }
@@ -1335,7 +1328,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearInt64Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000008);
         int64Type_ = 0L;
         onChanged();
         return this;
@@ -1356,8 +1349,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setUint32Type(int value) {
-        
+
         uint32Type_ = value;
+        bitField0_ |= 0x00000010;
         onChanged();
         return this;
       }
@@ -1366,7 +1360,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearUint32Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000010);
         uint32Type_ = 0;
         onChanged();
         return this;
@@ -1387,8 +1381,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setUint64Type(long value) {
-        
+
         uint64Type_ = value;
+        bitField0_ |= 0x00000020;
         onChanged();
         return this;
       }
@@ -1397,7 +1392,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearUint64Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000020);
         uint64Type_ = 0L;
         onChanged();
         return this;
@@ -1418,8 +1413,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setSint32Type(int value) {
-        
+
         sint32Type_ = value;
+        bitField0_ |= 0x00000040;
         onChanged();
         return this;
       }
@@ -1428,7 +1424,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearSint32Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000040);
         sint32Type_ = 0;
         onChanged();
         return this;
@@ -1449,8 +1445,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setSint64Type(long value) {
-        
+
         sint64Type_ = value;
+        bitField0_ |= 0x00000080;
         onChanged();
         return this;
       }
@@ -1459,7 +1456,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearSint64Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000080);
         sint64Type_ = 0L;
         onChanged();
         return this;
@@ -1480,8 +1477,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setFixed32Type(int value) {
-        
+
         fixed32Type_ = value;
+        bitField0_ |= 0x00000100;
         onChanged();
         return this;
       }
@@ -1490,7 +1488,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearFixed32Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000100);
         fixed32Type_ = 0;
         onChanged();
         return this;
@@ -1511,8 +1509,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setFixed64Type(long value) {
-        
+
         fixed64Type_ = value;
+        bitField0_ |= 0x00000200;
         onChanged();
         return this;
       }
@@ -1521,7 +1520,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearFixed64Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000200);
         fixed64Type_ = 0L;
         onChanged();
         return this;
@@ -1542,8 +1541,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setSfixed32Type(int value) {
-        
+
         sfixed32Type_ = value;
+        bitField0_ |= 0x00000400;
         onChanged();
         return this;
       }
@@ -1552,7 +1552,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearSfixed32Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000400);
         sfixed32Type_ = 0;
         onChanged();
         return this;
@@ -1573,8 +1573,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setSfixed64Type(long value) {
-        
+
         sfixed64Type_ = value;
+        bitField0_ |= 0x00000800;
         onChanged();
         return this;
       }
@@ -1583,7 +1584,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearSfixed64Type() {
-        
+        bitField0_ = (bitField0_ & ~0x00000800);
         sfixed64Type_ = 0L;
         onChanged();
         return this;
@@ -1604,8 +1605,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setBoolType(boolean value) {
-        
+
         boolType_ = value;
+        bitField0_ |= 0x00001000;
         onChanged();
         return this;
       }
@@ -1614,7 +1616,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearBoolType() {
-        
+        bitField0_ = (bitField0_ & ~0x00001000);
         boolType_ = false;
         onChanged();
         return this;
@@ -1661,11 +1663,9 @@ public final class Proto3AllTypes {
        */
       public Builder setStringType(
           String value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         stringType_ = value;
+        bitField0_ |= 0x00002000;
         onChanged();
         return this;
       }
@@ -1674,8 +1674,8 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearStringType() {
-        
         stringType_ = getDefaultInstance().getStringType();
+        bitField0_ = (bitField0_ & ~0x00002000);
         onChanged();
         return this;
       }
@@ -1686,12 +1686,10 @@ public final class Proto3AllTypes {
        */
       public Builder setStringTypeBytes(
           com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  checkByteStringIsUtf8(value);
-        
+        if (value == null) { throw new NullPointerException(); }
+        checkByteStringIsUtf8(value);
         stringType_ = value;
+        bitField0_ |= 0x00002000;
         onChanged();
         return this;
       }
@@ -1711,11 +1709,9 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder setBytesType(com.google.protobuf.ByteString value) {
-        if (value == null) {
-    throw new NullPointerException();
-  }
-  
+        if (value == null) { throw new NullPointerException(); }
         bytesType_ = value;
+        bitField0_ |= 0x00004000;
         onChanged();
         return this;
       }
@@ -1724,7 +1720,7 @@ public final class Proto3AllTypes {
        * @return This builder for chaining.
        */
       public Builder clearBytesType() {
-        
+        bitField0_ = (bitField0_ & ~0x00004000);
         bytesType_ = getDefaultInstance().getBytesType();
         onChanged();
         return this;
@@ -1746,12 +1742,12 @@ public final class Proto3AllTypes {
     }
 
     // @@protoc_insertion_point(class_scope:org.redisson.codec.protobuf.raw.AllTypes3)
-    private static final AllTypes3 DEFAULT_INSTANCE;
+    private static final Proto3AllTypes.AllTypes3 DEFAULT_INSTANCE;
     static {
-      DEFAULT_INSTANCE = new AllTypes3();
+      DEFAULT_INSTANCE = new Proto3AllTypes.AllTypes3();
     }
 
-    public static AllTypes3 getDefaultInstance() {
+    public static Proto3AllTypes.AllTypes3 getDefaultInstance() {
       return DEFAULT_INSTANCE;
     }
 
@@ -1762,7 +1758,18 @@ public final class Proto3AllTypes {
           com.google.protobuf.CodedInputStream input,
           com.google.protobuf.ExtensionRegistryLite extensionRegistry)
           throws com.google.protobuf.InvalidProtocolBufferException {
-        return new AllTypes3(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();
       }
     };
 
@@ -1776,7 +1783,7 @@ public final class Proto3AllTypes {
     }
 
     @Override
-    public AllTypes3 getDefaultInstanceForType() {
+    public Proto3AllTypes.AllTypes3 getDefaultInstanceForType() {
       return DEFAULT_INSTANCE;
     }
 
@@ -1818,7 +1825,7 @@ public final class Proto3AllTypes {
     internal_static_org_redisson_codec_protobuf_raw_AllTypes3_fieldAccessorTable = new
       com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
         internal_static_org_redisson_codec_protobuf_raw_AllTypes3_descriptor,
-        new String[] { "DoubleType", "FloatType", "Int32Type", "Int64Type", "Uint32Type", "Uint64Type", "Sint32Type", "Sint64Type", "Fixed32Type", "Fixed64Type", "Sfixed32Type", "Sfixed64Type", "BoolType", "StringType", "BytesType", "FloatType", });
+        new String[] { "DoubleType", "FloatType", "Int32Type", "Int64Type", "Uint32Type", "Uint64Type", "Sint32Type", "Sint64Type", "Fixed32Type", "Fixed64Type", "Sfixed32Type", "Sfixed64Type", "BoolType", "StringType", "BytesType", });
   }
 
   // @@protoc_insertion_point(outer_class_scope)