Skip to content

Commit 059ef61

Browse files
committed
regenerate options converters
1 parent fb8615b commit 059ef61

File tree

7 files changed

+177
-109
lines changed

7 files changed

+177
-109
lines changed

src/main/generated/io/vertx/redis/client/CachingRedisOptionsConverter.java

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ public class CachingRedisOptionsConverter {
2020
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, CachingRedisOptions obj) {
2121
for (java.util.Map.Entry<String, Object> member : json) {
2222
switch (member.getKey()) {
23+
case "enabled":
24+
if (member.getValue() instanceof Boolean) {
25+
obj.setEnabled((Boolean)member.getValue());
26+
}
27+
break;
28+
case "maxCacheSize":
29+
if (member.getValue() instanceof Number) {
30+
obj.setMaxCacheSize(((Number)member.getValue()).intValue());
31+
}
32+
break;
2333
case "maxAge":
2434
if (member.getValue() instanceof Number) {
2535
obj.setMaxAge(((Number)member.getValue()).longValue());
@@ -30,21 +40,11 @@ public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json,
3040
obj.setMaxAgeUnit(java.util.concurrent.TimeUnit.valueOf((String)member.getValue()));
3141
}
3242
break;
33-
case "maxCacheSize":
34-
if (member.getValue() instanceof Number) {
35-
obj.setMaxCacheSize(((Number)member.getValue()).intValue());
36-
}
37-
break;
3843
case "mode":
3944
if (member.getValue() instanceof String) {
4045
obj.setMode(io.vertx.redis.client.ClientSideCacheMode.valueOf((String)member.getValue()));
4146
}
4247
break;
43-
case "prefix":
44-
if (member.getValue() instanceof String) {
45-
obj.setPrefix((String)member.getValue());
46-
}
47-
break;
4848
case "prefixes":
4949
if (member.getValue() instanceof JsonArray) {
5050
java.util.ArrayList<java.lang.String> list = new java.util.ArrayList<>();
@@ -55,6 +55,11 @@ public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json,
5555
obj.setPrefixes(list);
5656
}
5757
break;
58+
case "prefix":
59+
if (member.getValue() instanceof String) {
60+
obj.setPrefix((String)member.getValue());
61+
}
62+
break;
5863
case "prefixs":
5964
if (member.getValue() instanceof JsonArray) {
6065
((Iterable<Object>)member.getValue()).forEach( item -> {
@@ -72,11 +77,12 @@ public static void toJson(CachingRedisOptions obj, JsonObject json) {
7277
}
7378

7479
public static void toJson(CachingRedisOptions obj, java.util.Map<String, Object> json) {
80+
json.put("enabled", obj.getEnabled());
81+
json.put("maxCacheSize", obj.getMaxCacheSize());
7582
json.put("maxAge", obj.getMaxAge());
7683
if (obj.getMaxAgeUnit() != null) {
7784
json.put("maxAgeUnit", obj.getMaxAgeUnit().name());
7885
}
79-
json.put("maxCacheSize", obj.getMaxCacheSize());
8086
if (obj.getMode() != null) {
8187
json.put("mode", obj.getMode().name());
8288
}

src/main/generated/io/vertx/redis/client/PoolOptionsConverter.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ public class PoolOptionsConverter {
2020
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, PoolOptions obj) {
2121
for (java.util.Map.Entry<String, Object> member : json) {
2222
switch (member.getKey()) {
23+
case "name":
24+
if (member.getValue() instanceof String) {
25+
obj.setName((String)member.getValue());
26+
}
27+
break;
2328
case "cleanerInterval":
2429
if (member.getValue() instanceof Number) {
2530
obj.setCleanerInterval(((Number)member.getValue()).intValue());
@@ -35,11 +40,6 @@ public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json,
3540
obj.setMaxWaiting(((Number)member.getValue()).intValue());
3641
}
3742
break;
38-
case "name":
39-
if (member.getValue() instanceof String) {
40-
obj.setName((String)member.getValue());
41-
}
42-
break;
4343
case "recycleTimeout":
4444
if (member.getValue() instanceof Number) {
4545
obj.setRecycleTimeout(((Number)member.getValue()).intValue());
@@ -54,12 +54,12 @@ public static void toJson(PoolOptions obj, JsonObject json) {
5454
}
5555

5656
public static void toJson(PoolOptions obj, java.util.Map<String, Object> json) {
57-
json.put("cleanerInterval", obj.getCleanerInterval());
58-
json.put("maxSize", obj.getMaxSize());
59-
json.put("maxWaiting", obj.getMaxWaiting());
6057
if (obj.getName() != null) {
6158
json.put("name", obj.getName());
6259
}
60+
json.put("cleanerInterval", obj.getCleanerInterval());
61+
json.put("maxSize", obj.getMaxSize());
62+
json.put("maxWaiting", obj.getMaxWaiting());
6363
json.put("recycleTimeout", obj.getRecycleTimeout());
6464
}
6565
}

src/main/generated/io/vertx/redis/client/RedisConnectOptionsConverter.java

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,51 +20,51 @@ public class RedisConnectOptionsConverter {
2020
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, RedisConnectOptions obj) {
2121
for (java.util.Map.Entry<String, Object> member : json) {
2222
switch (member.getKey()) {
23-
case "connectionString":
23+
case "maxNestedArrays":
24+
if (member.getValue() instanceof Number) {
25+
obj.setMaxNestedArrays(((Number)member.getValue()).intValue());
26+
}
27+
break;
28+
case "protocolNegotiation":
29+
if (member.getValue() instanceof Boolean) {
30+
obj.setProtocolNegotiation((Boolean)member.getValue());
31+
}
32+
break;
33+
case "password":
2434
if (member.getValue() instanceof String) {
25-
obj.setConnectionString((String)member.getValue());
35+
obj.setPassword((String)member.getValue());
2636
}
2737
break;
28-
case "connectionStrings":
38+
case "endpoints":
2939
if (member.getValue() instanceof JsonArray) {
40+
java.util.ArrayList<java.lang.String> list = new java.util.ArrayList<>();
3041
((Iterable<Object>)member.getValue()).forEach( item -> {
3142
if (item instanceof String)
32-
obj.addConnectionString((String)item);
43+
list.add((String)item);
3344
});
45+
obj.setEndpoints(list);
3446
}
3547
break;
3648
case "endpoint":
3749
break;
38-
case "endpoints":
50+
case "connectionStrings":
3951
if (member.getValue() instanceof JsonArray) {
40-
java.util.ArrayList<java.lang.String> list = new java.util.ArrayList<>();
4152
((Iterable<Object>)member.getValue()).forEach( item -> {
4253
if (item instanceof String)
43-
list.add((String)item);
54+
obj.addConnectionString((String)item);
4455
});
45-
obj.setEndpoints(list);
4656
}
4757
break;
48-
case "maxNestedArrays":
49-
if (member.getValue() instanceof Number) {
50-
obj.setMaxNestedArrays(((Number)member.getValue()).intValue());
58+
case "connectionString":
59+
if (member.getValue() instanceof String) {
60+
obj.setConnectionString((String)member.getValue());
5161
}
5262
break;
5363
case "maxWaitingHandlers":
5464
if (member.getValue() instanceof Number) {
5565
obj.setMaxWaitingHandlers(((Number)member.getValue()).intValue());
5666
}
5767
break;
58-
case "password":
59-
if (member.getValue() instanceof String) {
60-
obj.setPassword((String)member.getValue());
61-
}
62-
break;
63-
case "protocolNegotiation":
64-
if (member.getValue() instanceof Boolean) {
65-
obj.setProtocolNegotiation((Boolean)member.getValue());
66-
}
67-
break;
6868
}
6969
}
7070
}
@@ -74,19 +74,19 @@ public static void toJson(RedisConnectOptions obj, JsonObject json) {
7474
}
7575

7676
public static void toJson(RedisConnectOptions obj, java.util.Map<String, Object> json) {
77-
if (obj.getEndpoint() != null) {
78-
json.put("endpoint", obj.getEndpoint());
77+
json.put("maxNestedArrays", obj.getMaxNestedArrays());
78+
json.put("protocolNegotiation", obj.isProtocolNegotiation());
79+
if (obj.getPassword() != null) {
80+
json.put("password", obj.getPassword());
7981
}
8082
if (obj.getEndpoints() != null) {
8183
JsonArray array = new JsonArray();
8284
obj.getEndpoints().forEach(item -> array.add(item));
8385
json.put("endpoints", array);
8486
}
85-
json.put("maxNestedArrays", obj.getMaxNestedArrays());
86-
json.put("maxWaitingHandlers", obj.getMaxWaitingHandlers());
87-
if (obj.getPassword() != null) {
88-
json.put("password", obj.getPassword());
87+
if (obj.getEndpoint() != null) {
88+
json.put("endpoint", obj.getEndpoint());
8989
}
90-
json.put("protocolNegotiation", obj.isProtocolNegotiation());
90+
json.put("maxWaitingHandlers", obj.getMaxWaitingHandlers());
9191
}
9292
}

0 commit comments

Comments
 (0)