Skip to content

Commit

Permalink
Update to vertx5-parent version 4
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Sep 10, 2024
1 parent 8e4634d commit 63d414d
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 9 deletions.
30 changes: 21 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.vertx</groupId>
<artifactId>vertx5-parent</artifactId>
<version>3</version>
<version>4</version>
</parent>

<artifactId>vertx-bridge-common</artifactId>
Expand Down Expand Up @@ -33,18 +33,23 @@
<dependencies>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen</artifactId>
<artifactId>vertx-codegen-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
<artifactId>vertx-codegen-json</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-docgen</artifactId>
<artifactId>vertx-docgen-api</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-core</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand All @@ -68,12 +73,19 @@
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<configuration>
<annotationProcessors>
<annotationProcessor>io.vertx.codegen.CodeGenProcessor</annotationProcessor>
<annotationProcessor>io.vertx.docgen.JavaDocGenProcessor</annotationProcessor>
</annotationProcessors>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>io.vertx</groupId>
<artifactId>vertx-codegen</artifactId>
<classifier>processor</classifier>
</annotationProcessorPath>
<annotationProcessorPath>
<groupId>io.vertx</groupId>
<artifactId>vertx-docgen-processor</artifactId>
<classifier>processor</classifier>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</execution>
</executions>
Expand Down
61 changes: 61 additions & 0 deletions src/main/generated/io/vertx/ext/bridge/BridgeOptionsConverter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package io.vertx.ext.bridge;

import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
import java.util.Base64;

/**
* Converter and mapper for {@link io.vertx.ext.bridge.BridgeOptions}.
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.bridge.BridgeOptions} original class using Vert.x codegen.
*/
public class BridgeOptionsConverter {

private static final Base64.Decoder BASE64_DECODER = Base64.getUrlDecoder();
private static final Base64.Encoder BASE64_ENCODER = Base64.getUrlEncoder().withoutPadding();

static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, BridgeOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "inboundPermitteds":
if (member.getValue() instanceof JsonArray) {
java.util.ArrayList<io.vertx.ext.bridge.PermittedOptions> list = new java.util.ArrayList<>();
((Iterable<Object>)member.getValue()).forEach( item -> {
if (item instanceof JsonObject)
list.add(new io.vertx.ext.bridge.PermittedOptions((io.vertx.core.json.JsonObject)item));
});
obj.setInboundPermitteds(list);
}
break;
case "outboundPermitteds":
if (member.getValue() instanceof JsonArray) {
java.util.ArrayList<io.vertx.ext.bridge.PermittedOptions> list = new java.util.ArrayList<>();
((Iterable<Object>)member.getValue()).forEach( item -> {
if (item instanceof JsonObject)
list.add(new io.vertx.ext.bridge.PermittedOptions((io.vertx.core.json.JsonObject)item));
});
obj.setOutboundPermitteds(list);
}
break;
}
}
}

static void toJson(BridgeOptions obj, JsonObject json) {
toJson(obj, json.getMap());
}

static void toJson(BridgeOptions obj, java.util.Map<String, Object> json) {
if (obj.getInboundPermitteds() != null) {
JsonArray array = new JsonArray();
obj.getInboundPermitteds().forEach(item -> array.add(item.toJson()));
json.put("inboundPermitteds", array);
}
if (obj.getOutboundPermitteds() != null) {
JsonArray array = new JsonArray();
obj.getOutboundPermitteds().forEach(item -> array.add(item.toJson()));
json.put("outboundPermitteds", array);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package io.vertx.ext.bridge;

import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import java.time.Instant;
import java.time.format.DateTimeFormatter;
import java.util.Base64;

/**
* Converter and mapper for {@link io.vertx.ext.bridge.PermittedOptions}.
* NOTE: This class has been automatically generated from the {@link io.vertx.ext.bridge.PermittedOptions} original class using Vert.x codegen.
*/
public class PermittedOptionsConverter {

private static final Base64.Decoder BASE64_DECODER = Base64.getUrlDecoder();
private static final Base64.Encoder BASE64_ENCODER = Base64.getUrlEncoder().withoutPadding();

static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, PermittedOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "address":
if (member.getValue() instanceof String) {
obj.setAddress((String)member.getValue());
}
break;
case "addressRegex":
if (member.getValue() instanceof String) {
obj.setAddressRegex((String)member.getValue());
}
break;
case "match":
if (member.getValue() instanceof JsonObject) {
obj.setMatch(((JsonObject)member.getValue()).copy());
}
break;
case "requiredAuthority":
if (member.getValue() instanceof String) {
obj.setRequiredAuthority((String)member.getValue());
}
break;
}
}
}

static void toJson(PermittedOptions obj, JsonObject json) {
toJson(obj, json.getMap());
}

static void toJson(PermittedOptions obj, java.util.Map<String, Object> json) {
if (obj.getAddress() != null) {
json.put("address", obj.getAddress());
}
if (obj.getAddressRegex() != null) {
json.put("addressRegex", obj.getAddressRegex());
}
if (obj.getMatch() != null) {
json.put("match", obj.getMatch());
}
if (obj.getRequiredAuthority() != null) {
json.put("requiredAuthority", obj.getRequiredAuthority());
}
}
}

0 comments on commit 63d414d

Please sign in to comment.