Skip to content

Commit 43f6097

Browse files
committed
Regen code
1 parent 59ecb04 commit 43f6097

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
package io.vertx.httpproxy;
2+
3+
import io.vertx.core.json.JsonObject;
4+
import io.vertx.core.json.JsonArray;
5+
import io.vertx.core.json.impl.JsonUtil;
6+
import java.time.Instant;
7+
import java.time.format.DateTimeFormatter;
8+
import java.util.Base64;
9+
10+
/**
11+
* Converter and mapper for {@link io.vertx.httpproxy.ProxyOptions}.
12+
* NOTE: This class has been automatically generated from the {@link io.vertx.httpproxy.ProxyOptions} original class using Vert.x codegen.
13+
*/
14+
public class ProxyOptionsConverter {
15+
16+
17+
private static final Base64.Decoder BASE64_DECODER = JsonUtil.BASE64_DECODER;
18+
private static final Base64.Encoder BASE64_ENCODER = JsonUtil.BASE64_ENCODER;
19+
20+
static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, ProxyOptions obj) {
21+
for (java.util.Map.Entry<String, Object> member : json) {
22+
switch (member.getKey()) {
23+
case "cacheOptions":
24+
if (member.getValue() instanceof JsonObject) {
25+
obj.setCacheOptions(new io.vertx.httpproxy.cache.CacheOptions((io.vertx.core.json.JsonObject)member.getValue()));
26+
}
27+
break;
28+
case "supportWebSocket":
29+
if (member.getValue() instanceof Boolean) {
30+
obj.setSupportWebSocket((Boolean)member.getValue());
31+
}
32+
break;
33+
}
34+
}
35+
}
36+
37+
static void toJson(ProxyOptions obj, JsonObject json) {
38+
toJson(obj, json.getMap());
39+
}
40+
41+
static void toJson(ProxyOptions obj, java.util.Map<String, Object> json) {
42+
if (obj.getCacheOptions() != null) {
43+
json.put("cacheOptions", obj.getCacheOptions().toJson());
44+
}
45+
json.put("supportWebSocket", obj.getSupportWebSocket());
46+
}
47+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
package io.vertx.httpproxy.cache;
2+
3+
import io.vertx.core.json.JsonObject;
4+
import io.vertx.core.json.JsonArray;
5+
import io.vertx.core.json.impl.JsonUtil;
6+
import java.time.Instant;
7+
import java.time.format.DateTimeFormatter;
8+
import java.util.Base64;
9+
10+
/**
11+
* Converter and mapper for {@link io.vertx.httpproxy.cache.CacheOptions}.
12+
* NOTE: This class has been automatically generated from the {@link io.vertx.httpproxy.cache.CacheOptions} original class using Vert.x codegen.
13+
*/
14+
public class CacheOptionsConverter {
15+
16+
17+
private static final Base64.Decoder BASE64_DECODER = JsonUtil.BASE64_DECODER;
18+
private static final Base64.Encoder BASE64_ENCODER = JsonUtil.BASE64_ENCODER;
19+
20+
static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, CacheOptions obj) {
21+
for (java.util.Map.Entry<String, Object> member : json) {
22+
switch (member.getKey()) {
23+
case "maxSize":
24+
if (member.getValue() instanceof Number) {
25+
obj.setMaxSize(((Number)member.getValue()).intValue());
26+
}
27+
break;
28+
}
29+
}
30+
}
31+
32+
static void toJson(CacheOptions obj, JsonObject json) {
33+
toJson(obj, json.getMap());
34+
}
35+
36+
static void toJson(CacheOptions obj, java.util.Map<String, Object> json) {
37+
json.put("maxSize", obj.getMaxSize());
38+
}
39+
}

0 commit comments

Comments
 (0)