Skip to content

Commit

Permalink
Update generated files
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
  • Loading branch information
tsegismont committed Nov 8, 2023
1 parent d047778 commit 2851d4c
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 118 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ public class AggregateOptionsConverter {
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, AggregateOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "allowDiskUse":
if (member.getValue() instanceof Boolean) {
obj.setAllowDiskUse((Boolean)member.getValue());
}
break;
case "batchSize":
if (member.getValue() instanceof Number) {
obj.setBatchSize(((Number)member.getValue()).intValue());
}
break;
case "collation":
if (member.getValue() instanceof JsonObject) {
obj.setCollation(new io.vertx.ext.mongo.CollationOptions((io.vertx.core.json.JsonObject)member.getValue()));
Expand All @@ -40,6 +30,16 @@ public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json,
obj.setMaxTime(((Number)member.getValue()).longValue());
}
break;
case "batchSize":
if (member.getValue() instanceof Number) {
obj.setBatchSize(((Number)member.getValue()).intValue());
}
break;
case "allowDiskUse":
if (member.getValue() instanceof Boolean) {
obj.setAllowDiskUse((Boolean)member.getValue());
}
break;
}
}
}
Expand All @@ -49,13 +49,13 @@ public static void toJson(AggregateOptions obj, JsonObject json) {
}

public static void toJson(AggregateOptions obj, java.util.Map<String, Object> json) {
if (obj.getAllowDiskUse() != null) {
json.put("allowDiskUse", obj.getAllowDiskUse());
}
json.put("batchSize", obj.getBatchSize());
if (obj.getCollation() != null) {
json.put("collation", obj.getCollation().toJson());
}
json.put("maxTime", obj.getMaxTime());
json.put("batchSize", obj.getBatchSize());
if (obj.getAllowDiskUse() != null) {
json.put("allowDiskUse", obj.getAllowDiskUse());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,34 @@ public class CollationOptionsConverter {
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, CollationOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "backwards":
if (member.getValue() instanceof Boolean) {
obj.setBackwards((Boolean)member.getValue());
}
break;
case "caseLevel":
case "normalization":
if (member.getValue() instanceof Boolean) {
obj.setCaseLevel((Boolean)member.getValue());
obj.setNormalization((Boolean)member.getValue());
}
break;
case "locale":
if (member.getValue() instanceof String) {
obj.setLocale((String)member.getValue());
}
break;
case "normalization":
case "caseLevel":
if (member.getValue() instanceof Boolean) {
obj.setNormalization((Boolean)member.getValue());
obj.setCaseLevel((Boolean)member.getValue());
}
break;
case "strength":
if (member.getValue() instanceof String) {
obj.setStrength(com.mongodb.client.model.CollationStrength.valueOf((String)member.getValue()));
}
break;
case "numericOrdering":
if (member.getValue() instanceof Boolean) {
obj.setNumericOrdering((Boolean)member.getValue());
}
break;
case "strength":
if (member.getValue() instanceof String) {
obj.setStrength(com.mongodb.client.model.CollationStrength.valueOf((String)member.getValue()));
case "backwards":
if (member.getValue() instanceof Boolean) {
obj.setBackwards((Boolean)member.getValue());
}
break;
}
Expand All @@ -59,23 +59,23 @@ public static void toJson(CollationOptions obj, JsonObject json) {
}

public static void toJson(CollationOptions obj, java.util.Map<String, Object> json) {
if (obj.isBackwards() != null) {
json.put("backwards", obj.isBackwards());
}
if (obj.isCaseLevel() != null) {
json.put("caseLevel", obj.isCaseLevel());
if (obj.isNormalization() != null) {
json.put("normalization", obj.isNormalization());
}
if (obj.getLocale() != null) {
json.put("locale", obj.getLocale());
}
if (obj.isNormalization() != null) {
json.put("normalization", obj.isNormalization());
if (obj.isCaseLevel() != null) {
json.put("caseLevel", obj.isCaseLevel());
}
if (obj.getStrength() != null) {
json.put("strength", obj.getStrength().name());
}
if (obj.isNumericOrdering() != null) {
json.put("numericOrdering", obj.isNumericOrdering());
}
if (obj.getStrength() != null) {
json.put("strength", obj.getStrength().name());
if (obj.isBackwards() != null) {
json.put("backwards", obj.isBackwards());
}
}
}
26 changes: 13 additions & 13 deletions src/main/generated/io/vertx/ext/mongo/CountOptionsConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ public class CountOptionsConverter {
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, CountOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "collation":
if (member.getValue() instanceof JsonObject) {
obj.setCollation(new io.vertx.ext.mongo.CollationOptions((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "hint":
if (member.getValue() instanceof JsonObject) {
obj.setHint(((JsonObject)member.getValue()).copy());
Expand All @@ -40,14 +35,19 @@ public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json,
obj.setLimit(((Number)member.getValue()).intValue());
}
break;
case "skip":
if (member.getValue() instanceof Number) {
obj.setSkip(((Number)member.getValue()).intValue());
}
break;
case "maxTime":
if (member.getValue() instanceof Number) {
obj.setMaxTime(((Number)member.getValue()).longValue());
}
break;
case "skip":
if (member.getValue() instanceof Number) {
obj.setSkip(((Number)member.getValue()).intValue());
case "collation":
if (member.getValue() instanceof JsonObject) {
obj.setCollation(new io.vertx.ext.mongo.CollationOptions((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
}
Expand All @@ -59,9 +59,6 @@ public static void toJson(CountOptions obj, JsonObject json) {
}

public static void toJson(CountOptions obj, java.util.Map<String, Object> json) {
if (obj.getCollation() != null) {
json.put("collation", obj.getCollation().toJson());
}
if (obj.getHint() != null) {
json.put("hint", obj.getHint());
}
Expand All @@ -71,11 +68,14 @@ public static void toJson(CountOptions obj, java.util.Map<String, Object> json)
if (obj.getLimit() != null) {
json.put("limit", obj.getLimit());
}
if (obj.getSkip() != null) {
json.put("skip", obj.getSkip());
}
if (obj.getMaxTime() != null) {
json.put("maxTime", obj.getMaxTime());
}
if (obj.getSkip() != null) {
json.put("skip", obj.getSkip());
if (obj.getCollation() != null) {
json.put("collation", obj.getCollation().toJson());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,19 @@ public class CreateCollectionOptionsConverter {
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, CreateCollectionOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "maxDocuments":
if (member.getValue() instanceof Number) {
obj.setMaxDocuments(((Number)member.getValue()).longValue());
}
break;
case "capped":
if (member.getValue() instanceof Boolean) {
obj.setCapped((Boolean)member.getValue());
}
break;
case "collation":
if (member.getValue() instanceof JsonObject) {
obj.setCollation(new io.vertx.ext.mongo.CollationOptions((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "expireAfterSeconds":
if (member.getValue() instanceof Number) {
obj.setExpireAfterSeconds(((Number)member.getValue()).longValue());
}
break;
case "indexOptionDefaults":
case "timeSeriesOptions":
if (member.getValue() instanceof JsonObject) {
obj.setIndexOptionDefaults(((JsonObject)member.getValue()).copy());
}
break;
case "maxDocuments":
if (member.getValue() instanceof Number) {
obj.setMaxDocuments(((Number)member.getValue()).longValue());
obj.setTimeSeriesOptions(new io.vertx.ext.mongo.TimeSeriesOptions((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "sizeInBytes":
Expand All @@ -55,16 +45,26 @@ public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json,
obj.setStorageEngineOptions(((JsonObject)member.getValue()).copy());
}
break;
case "timeSeriesOptions":
case "indexOptionDefaults":
if (member.getValue() instanceof JsonObject) {
obj.setTimeSeriesOptions(new io.vertx.ext.mongo.TimeSeriesOptions((io.vertx.core.json.JsonObject)member.getValue()));
obj.setIndexOptionDefaults(((JsonObject)member.getValue()).copy());
}
break;
case "validationOptions":
if (member.getValue() instanceof JsonObject) {
obj.setValidationOptions(new io.vertx.ext.mongo.ValidationOptions((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "collation":
if (member.getValue() instanceof JsonObject) {
obj.setCollation(new io.vertx.ext.mongo.CollationOptions((io.vertx.core.json.JsonObject)member.getValue()));
}
break;
case "expireAfterSeconds":
if (member.getValue() instanceof Number) {
obj.setExpireAfterSeconds(((Number)member.getValue()).longValue());
}
break;
}
}
}
Expand All @@ -74,32 +74,32 @@ public static void toJson(CreateCollectionOptions obj, JsonObject json) {
}

public static void toJson(CreateCollectionOptions obj, java.util.Map<String, Object> json) {
if (obj.getMaxDocuments() != null) {
json.put("maxDocuments", obj.getMaxDocuments());
}
if (obj.getCapped() != null) {
json.put("capped", obj.getCapped());
}
if (obj.getCollation() != null) {
json.put("collation", obj.getCollation().toJson());
}
if (obj.getExpireAfterSeconds() != null) {
json.put("expireAfterSeconds", obj.getExpireAfterSeconds());
}
if (obj.getIndexOptionDefaults() != null) {
json.put("indexOptionDefaults", obj.getIndexOptionDefaults());
}
if (obj.getMaxDocuments() != null) {
json.put("maxDocuments", obj.getMaxDocuments());
if (obj.getTimeSeriesOptions() != null) {
json.put("timeSeriesOptions", obj.getTimeSeriesOptions().toJson());
}
if (obj.getSizeInBytes() != null) {
json.put("sizeInBytes", obj.getSizeInBytes());
}
if (obj.getStorageEngineOptions() != null) {
json.put("storageEngineOptions", obj.getStorageEngineOptions());
}
if (obj.getTimeSeriesOptions() != null) {
json.put("timeSeriesOptions", obj.getTimeSeriesOptions().toJson());
if (obj.getIndexOptionDefaults() != null) {
json.put("indexOptionDefaults", obj.getIndexOptionDefaults());
}
if (obj.getValidationOptions() != null) {
json.put("validationOptions", obj.getValidationOptions().toJson());
}
if (obj.getCollation() != null) {
json.put("collation", obj.getCollation().toJson());
}
if (obj.getExpireAfterSeconds() != null) {
json.put("expireAfterSeconds", obj.getExpireAfterSeconds());
}
}
}
40 changes: 20 additions & 20 deletions src/main/generated/io/vertx/ext/mongo/FindOptionsConverter.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ public class FindOptionsConverter {
public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json, FindOptions obj) {
for (java.util.Map.Entry<String, Object> member : json) {
switch (member.getKey()) {
case "batchSize":
if (member.getValue() instanceof Number) {
obj.setBatchSize(((Number)member.getValue()).intValue());
}
break;
case "collation":
if (member.getValue() instanceof JsonObject) {
obj.setCollation(new io.vertx.ext.mongo.CollationOptions((io.vertx.core.json.JsonObject)member.getValue()));
Expand All @@ -35,14 +30,9 @@ public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json,
obj.setFields(((JsonObject)member.getValue()).copy());
}
break;
case "hint":
case "sort":
if (member.getValue() instanceof JsonObject) {
obj.setHint(((JsonObject)member.getValue()).copy());
}
break;
case "hintString":
if (member.getValue() instanceof String) {
obj.setHintString((String)member.getValue());
obj.setSort(((JsonObject)member.getValue()).copy());
}
break;
case "limit":
Expand All @@ -55,9 +45,19 @@ public static void fromJson(Iterable<java.util.Map.Entry<String, Object>> json,
obj.setSkip(((Number)member.getValue()).intValue());
}
break;
case "sort":
case "batchSize":
if (member.getValue() instanceof Number) {
obj.setBatchSize(((Number)member.getValue()).intValue());
}
break;
case "hint":
if (member.getValue() instanceof JsonObject) {
obj.setSort(((JsonObject)member.getValue()).copy());
obj.setHint(((JsonObject)member.getValue()).copy());
}
break;
case "hintString":
if (member.getValue() instanceof String) {
obj.setHintString((String)member.getValue());
}
break;
}
Expand All @@ -69,23 +69,23 @@ public static void toJson(FindOptions obj, JsonObject json) {
}

public static void toJson(FindOptions obj, java.util.Map<String, Object> json) {
json.put("batchSize", obj.getBatchSize());
if (obj.getCollation() != null) {
json.put("collation", obj.getCollation().toJson());
}
if (obj.getFields() != null) {
json.put("fields", obj.getFields());
}
if (obj.getSort() != null) {
json.put("sort", obj.getSort());
}
json.put("limit", obj.getLimit());
json.put("skip", obj.getSkip());
json.put("batchSize", obj.getBatchSize());
if (obj.getHint() != null) {
json.put("hint", obj.getHint());
}
if (obj.getHintString() != null) {
json.put("hintString", obj.getHintString());
}
json.put("limit", obj.getLimit());
json.put("skip", obj.getSkip());
if (obj.getSort() != null) {
json.put("sort", obj.getSort());
}
}
}
Loading

0 comments on commit 2851d4c

Please sign in to comment.