-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to vertx-core inbound message queue changes
- Loading branch information
Showing
2 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
vertx-grpc-server/src/main/generated/io/vertx/grpc/server/GrpcServerOptionsConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package io.vertx.grpc.server; | ||
|
||
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.grpc.server.GrpcServerOptions}. | ||
* NOTE: This class has been automatically generated from the {@link io.vertx.grpc.server.GrpcServerOptions} original class using Vert.x codegen. | ||
*/ | ||
public class GrpcServerOptionsConverter { | ||
|
||
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, GrpcServerOptions obj) { | ||
for (java.util.Map.Entry<String, Object> member : json) { | ||
switch (member.getKey()) { | ||
case "grpcWebEnabled": | ||
if (member.getValue() instanceof Boolean) { | ||
obj.setGrpcWebEnabled((Boolean)member.getValue()); | ||
} | ||
break; | ||
case "scheduleDeadlineAutomatically": | ||
if (member.getValue() instanceof Boolean) { | ||
obj.setScheduleDeadlineAutomatically((Boolean)member.getValue()); | ||
} | ||
break; | ||
case "deadlinePropagation": | ||
if (member.getValue() instanceof Boolean) { | ||
obj.setDeadlinePropagation((Boolean)member.getValue()); | ||
} | ||
break; | ||
case "maxMessageSize": | ||
if (member.getValue() instanceof Number) { | ||
obj.setMaxMessageSize(((Number)member.getValue()).longValue()); | ||
} | ||
break; | ||
} | ||
} | ||
} | ||
|
||
static void toJson(GrpcServerOptions obj, JsonObject json) { | ||
toJson(obj, json.getMap()); | ||
} | ||
|
||
static void toJson(GrpcServerOptions obj, java.util.Map<String, Object> json) { | ||
json.put("grpcWebEnabled", obj.isGrpcWebEnabled()); | ||
json.put("scheduleDeadlineAutomatically", obj.getScheduleDeadlineAutomatically()); | ||
json.put("deadlinePropagation", obj.getDeadlinePropagation()); | ||
json.put("maxMessageSize", obj.getMaxMessageSize()); | ||
} | ||
} |