All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.computate.vertx.api.ApiRequestGen Maven / Gradle / Ivy

/*
 * Copyright (c) 2018-2022 Computate Limited Liability Company in Utah, USA. 
 *
 * This program and the accompanying materials are made available under the
 * terms of the GNU GENERAL PUBLIC LICENSE Version 3 which is available at
 * 
 * https://www.gnu.org/licenses/gpl-3.0.en.html
 * 
 * You may not propagate or modify a covered work except as expressly provided 
 * under this License. Any attempt otherwise to propagate or modify it is void, 
 * and will automatically terminate your rights under this License (including 
 * any patent licenses granted under the third paragraph of section 11).
 */
package org.computate.vertx.api;

import org.computate.vertx.request.ComputateSiteRequest;
import org.computate.vertx.api.ApiRequest;
import org.computate.vertx.config.ComputateConfigKeys;
import java.util.Optional;
import java.util.List;
import org.apache.commons.lang3.StringUtils;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import org.computate.search.serialize.ComputateLocalDateSerializer;
import org.computate.search.serialize.ComputateLocalDateDeserializer;
import org.computate.search.serialize.ComputateZonedDateTimeSerializer;
import org.computate.search.serialize.ComputateZonedDateTimeDeserializer;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import java.math.MathContext;
import org.apache.commons.lang3.math.NumberUtils;
import java.text.NumberFormat;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.HashMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.math.RoundingMode;
import java.util.Map;
import java.lang.Object;
import java.time.ZonedDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
import java.time.LocalDateTime;
import java.time.LocalDate;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import java.time.format.DateTimeFormatter;
import java.time.Instant;
import java.util.Locale;
import java.time.OffsetDateTime;
import java.lang.String;
import java.lang.Long;
import io.vertx.core.json.JsonArray;
import org.computate.search.wrap.Wrap;
import io.vertx.core.Promise;
import io.vertx.core.Future;

/**	
    0

    Suggestions that can generate more code for you:

*
  • You can add a class comment "Api: true" if you wish to GET, POST, PATCH or PUT these ApiRequest objects in a RESTful API. *
  • You can add a class comment "{@inheritDoc}" if you wish to inherit the helpful inherited class comments from class ApiRequestGen into the class ApiRequest. *
  • *

    About the ApiRequest class and it's generated class ApiRequestGen<Object>:

    extends ApiRequestGen *

    * This Java class extends a generated Java class ApiRequestGen built by the https://github.com/computate-org/computate project. * Whenever this Java class is modified or touched, the watch service installed as described in the README, indexes all the information about this Java class in a local Apache Solr Search Engine. * If you are running the service, you can see the indexed data about this Java Class here: *

    *

    Find the class ApiRequest in Solr.

    *

    * The extended class ending with "Gen" did not exist at first, but was automatically created by the same watch service based on the data retrieved from the local Apache Server search engine. * The extended class contains many generated fields, getters, setters, initialization code, and helper methods to help build a website and API fast, reactive, and scalable. *

    * extends ApiRequestGen *

    This class ApiRequest extends ApiRequestGen<Object>, which means it extends a newly generated ApiRequestGen. * The generated class ApiRequestGen extends Object which means that ApiRequest extends ApiRequestGen which extends Object. * This generated inheritance is a powerful feature that allows a lot of boiler plate code to be created for you automatically while still preserving inheritance through the power of Java Generic classes. *

    * Api: true * ApiTag.enUS: true * ApiUri.enUS: null * Color: null * IconGroup: null * IconName: null * Indexed: true * {@inheritDoc} *

    By adding a class comment "{@inheritDoc}", the ApiRequest class will inherit the helpful inherited class comments from the super class ApiRequestGen. *

    * Rows: null * Model: true * Page: true * SuperPage.enUS: null * Promise: true * AName.enUS: null *

    * Delete the class ApiRequest in Solr: * curl -k 'https://solr-solr.apps-crc.testing/solr/computate/update?commitWithin=1000&overwrite=true&wt=json' -X POST -H 'Content-type: text/xml' --data-raw '<add><delete><query>classeNomCanonique_enUS_indexed_string:org.computate.vertx.api.ApiRequest</query></delete></add>' *

    *

    * Delete the package org.computate.vertx.api in Solr: * curl -k 'https://solr-solr.apps-crc.testing/solr/computate/update?commitWithin=1000&overwrite=true&wt=json' -X POST -H 'Content-type: text/xml' --data-raw '<add><delete><query>classeNomEnsemble_enUS_indexed_string:org.computate.vertx.api</query></delete></add>' *

    *

    * Delete the project computate-vertx in Solr: * curl -k 'https://solr-solr.apps-crc.testing/solr/computate/update?commitWithin=1000&overwrite=true&wt=json' -X POST -H 'Content-type: text/xml' --data-raw '<add><delete><query>siteNom_indexed_string:computate\-vertx</query></delete></add>' *

    **/ public abstract class ApiRequestGen extends Object { protected static final Logger LOG = LoggerFactory.getLogger(ApiRequest.class); ////////////////// // siteRequest_ // ////////////////// /** The entity siteRequest_ * is defined as null before being initialized. */ @JsonIgnore @JsonInclude(Include.NON_NULL) protected ComputateSiteRequest siteRequest_; /**
    The entity siteRequest_ * is defined as null before being initialized. *
    Find the entity siteRequest_ in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _siteRequest_(Wrap c); public ComputateSiteRequest getSiteRequest_() { return siteRequest_; } public void setSiteRequest_(ComputateSiteRequest siteRequest_) { this.siteRequest_ = siteRequest_; } public static ComputateSiteRequest staticSetSiteRequest_(ComputateSiteRequest siteRequest_, String o) { return null; } protected ApiRequest siteRequest_Init() { Wrap siteRequest_Wrap = new Wrap().var("siteRequest_"); if(siteRequest_ == null) { _siteRequest_(siteRequest_Wrap); Optional.ofNullable(siteRequest_Wrap.getO()).ifPresent(o -> { setSiteRequest_(o); }); } return (ApiRequest)this; } ///////////// // created // ///////////// /** The entity created * is defined as null before being initialized. */ @JsonProperty @JsonDeserialize(using = ComputateZonedDateTimeDeserializer.class) @JsonSerialize(using = ComputateZonedDateTimeSerializer.class) @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd'T'HH:mm:ss.SSSV'['VV']'") @JsonInclude(Include.NON_NULL) protected ZonedDateTime created; /**
    The entity created * is defined as null before being initialized. *
    Find the entity created in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _created(Wrap c); public ZonedDateTime getCreated() { return created; } public void setCreated(ZonedDateTime created) { this.created = created; } @JsonIgnore public void setCreated(Instant o) { this.created = o == null ? null : ZonedDateTime.from(o).truncatedTo(ChronoUnit.MILLIS); } /** Example: 2011-12-03T10:15:30+01:00 **/ @JsonIgnore public void setCreated(String o) { this.created = ApiRequest.staticSetCreated(siteRequest_, o); } public static ZonedDateTime staticSetCreated(ComputateSiteRequest siteRequest_, String o) { if(StringUtils.endsWith(o, "]")) return o == null ? null : ZonedDateTime.parse(o, ComputateZonedDateTimeSerializer.ZONED_DATE_TIME_FORMATTER); else if(StringUtils.endsWith(o, "Z")) return o == null ? null : Instant.parse(o).atZone(Optional.ofNullable(siteRequest_).map(r -> r.getConfig()).map(config -> config.getString(ComputateConfigKeys.SITE_ZONE)).map(z -> ZoneId.of(z)).orElse(ZoneId.of("UTC"))).truncatedTo(ChronoUnit.MILLIS); else if(StringUtils.contains(o, "T")) return o == null ? null : ZonedDateTime.parse(o, DateTimeFormatter.ISO_DATE_TIME).truncatedTo(ChronoUnit.MILLIS); else return o == null ? null : LocalDate.parse(o, DateTimeFormatter.ISO_DATE).atStartOfDay(ZoneId.of(siteRequest_.getConfig().getString(ComputateConfigKeys.SITE_ZONE))).truncatedTo(ChronoUnit.MILLIS); } @JsonIgnore public void setCreated(Date o) { this.created = o == null ? null : ZonedDateTime.ofInstant(o.toInstant(), ZoneId.of(siteRequest_.getConfig().getString(ComputateConfigKeys.SITE_ZONE))).truncatedTo(ChronoUnit.MILLIS); } protected ApiRequest createdInit() { Wrap createdWrap = new Wrap().var("created"); if(created == null) { _created(createdWrap); Optional.ofNullable(createdWrap.getO()).ifPresent(o -> { setCreated(o); }); } return (ApiRequest)this; } public static Date staticSearchCreated(ComputateSiteRequest siteRequest_, ZonedDateTime o) { return o == null ? null : Date.from(o.toInstant()); } public static String staticSearchStrCreated(ComputateSiteRequest siteRequest_, Date o) { return "\"" + DateTimeFormatter.ISO_DATE_TIME.format(o.toInstant().atOffset(ZoneOffset.UTC)) + "\""; } public static String staticSearchFqCreated(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrCreated(siteRequest_, ApiRequest.staticSearchCreated(siteRequest_, ApiRequest.staticSetCreated(siteRequest_, o))); } ////////// // rows // ////////// /** The entity rows * is defined as null before being initialized. */ @JsonProperty @JsonSerialize(using = ToStringSerializer.class) @JsonInclude(Include.NON_NULL) protected Long rows; /**
    The entity rows * is defined as null before being initialized. *
    Find the entity rows in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _rows(Wrap c); public Long getRows() { return rows; } public void setRows(Long rows) { this.rows = rows; } @JsonIgnore public void setRows(String o) { this.rows = ApiRequest.staticSetRows(siteRequest_, o); } public static Long staticSetRows(ComputateSiteRequest siteRequest_, String o) { if(NumberUtils.isParsable(o)) return Long.parseLong(o); return null; } protected ApiRequest rowsInit() { Wrap rowsWrap = new Wrap().var("rows"); if(rows == null) { _rows(rowsWrap); Optional.ofNullable(rowsWrap.getO()).ifPresent(o -> { setRows(o); }); } return (ApiRequest)this; } public static Long staticSearchRows(ComputateSiteRequest siteRequest_, Long o) { return o; } public static String staticSearchStrRows(ComputateSiteRequest siteRequest_, Long o) { return o == null ? null : o.toString(); } public static String staticSearchFqRows(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrRows(siteRequest_, ApiRequest.staticSearchRows(siteRequest_, ApiRequest.staticSetRows(siteRequest_, o))); } ////////////// // numFound // ////////////// /** The entity numFound * is defined as null before being initialized. */ @JsonProperty @JsonSerialize(using = ToStringSerializer.class) @JsonInclude(Include.NON_NULL) protected Long numFound; /**
    The entity numFound * is defined as null before being initialized. *
    Find the entity numFound in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _numFound(Wrap c); public Long getNumFound() { return numFound; } public void setNumFound(Long numFound) { this.numFound = numFound; } @JsonIgnore public void setNumFound(String o) { this.numFound = ApiRequest.staticSetNumFound(siteRequest_, o); } public static Long staticSetNumFound(ComputateSiteRequest siteRequest_, String o) { if(NumberUtils.isParsable(o)) return Long.parseLong(o); return null; } protected ApiRequest numFoundInit() { Wrap numFoundWrap = new Wrap().var("numFound"); if(numFound == null) { _numFound(numFoundWrap); Optional.ofNullable(numFoundWrap.getO()).ifPresent(o -> { setNumFound(o); }); } return (ApiRequest)this; } public static Long staticSearchNumFound(ComputateSiteRequest siteRequest_, Long o) { return o; } public static String staticSearchStrNumFound(ComputateSiteRequest siteRequest_, Long o) { return o == null ? null : o.toString(); } public static String staticSearchFqNumFound(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrNumFound(siteRequest_, ApiRequest.staticSearchNumFound(siteRequest_, ApiRequest.staticSetNumFound(siteRequest_, o))); } ////////////// // numPATCH // ////////////// /** The entity numPATCH * is defined as null before being initialized. */ @JsonProperty @JsonSerialize(using = ToStringSerializer.class) @JsonInclude(Include.NON_NULL) protected Long numPATCH; /**
    The entity numPATCH * is defined as null before being initialized. *
    Find the entity numPATCH in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _numPATCH(Wrap c); public Long getNumPATCH() { return numPATCH; } public void setNumPATCH(Long numPATCH) { this.numPATCH = numPATCH; } @JsonIgnore public void setNumPATCH(String o) { this.numPATCH = ApiRequest.staticSetNumPATCH(siteRequest_, o); } public static Long staticSetNumPATCH(ComputateSiteRequest siteRequest_, String o) { if(NumberUtils.isParsable(o)) return Long.parseLong(o); return null; } protected ApiRequest numPATCHInit() { Wrap numPATCHWrap = new Wrap().var("numPATCH"); if(numPATCH == null) { _numPATCH(numPATCHWrap); Optional.ofNullable(numPATCHWrap.getO()).ifPresent(o -> { setNumPATCH(o); }); } return (ApiRequest)this; } public static Long staticSearchNumPATCH(ComputateSiteRequest siteRequest_, Long o) { return o; } public static String staticSearchStrNumPATCH(ComputateSiteRequest siteRequest_, Long o) { return o == null ? null : o.toString(); } public static String staticSearchFqNumPATCH(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrNumPATCH(siteRequest_, ApiRequest.staticSearchNumPATCH(siteRequest_, ApiRequest.staticSetNumPATCH(siteRequest_, o))); } ////////// // uuid // ////////// /** The entity uuid * is defined as null before being initialized. */ @JsonProperty @JsonInclude(Include.NON_NULL) protected String uuid; /**
    The entity uuid * is defined as null before being initialized. *
    Find the entity uuid in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _uuid(Wrap c); public String getUuid() { return uuid; } public void setUuid(String o) { this.uuid = ApiRequest.staticSetUuid(siteRequest_, o); } public static String staticSetUuid(ComputateSiteRequest siteRequest_, String o) { return o; } protected ApiRequest uuidInit() { Wrap uuidWrap = new Wrap().var("uuid"); if(uuid == null) { _uuid(uuidWrap); Optional.ofNullable(uuidWrap.getO()).ifPresent(o -> { setUuid(o); }); } return (ApiRequest)this; } public static String staticSearchUuid(ComputateSiteRequest siteRequest_, String o) { return o; } public static String staticSearchStrUuid(ComputateSiteRequest siteRequest_, String o) { return o == null ? null : o.toString(); } public static String staticSearchFqUuid(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrUuid(siteRequest_, ApiRequest.staticSearchUuid(siteRequest_, ApiRequest.staticSetUuid(siteRequest_, o))); } //////// // id // //////// /** The entity id * is defined as null before being initialized. */ @JsonProperty @JsonInclude(Include.NON_NULL) protected String id; /**
    The entity id * is defined as null before being initialized. *
    Find the entity id in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _id(Wrap c); public String getId() { return id; } public void setId(String o) { this.id = ApiRequest.staticSetId(siteRequest_, o); } public static String staticSetId(ComputateSiteRequest siteRequest_, String o) { return o; } protected ApiRequest idInit() { Wrap idWrap = new Wrap().var("id"); if(id == null) { _id(idWrap); Optional.ofNullable(idWrap.getO()).ifPresent(o -> { setId(o); }); } return (ApiRequest)this; } public static String staticSearchId(ComputateSiteRequest siteRequest_, String o) { return o; } public static String staticSearchStrId(ComputateSiteRequest siteRequest_, String o) { return o == null ? null : o.toString(); } public static String staticSearchFqId(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrId(siteRequest_, ApiRequest.staticSearchId(siteRequest_, ApiRequest.staticSetId(siteRequest_, o))); } //////// // pk // //////// /** The entity pk * is defined as null before being initialized. */ @JsonProperty @JsonSerialize(using = ToStringSerializer.class) @JsonInclude(Include.NON_NULL) protected Long pk; /**
    The entity pk * is defined as null before being initialized. *
    Find the entity pk in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _pk(Wrap c); public Long getPk() { return pk; } public void setPk(Long pk) { this.pk = pk; } @JsonIgnore public void setPk(String o) { this.pk = ApiRequest.staticSetPk(siteRequest_, o); } public static Long staticSetPk(ComputateSiteRequest siteRequest_, String o) { if(NumberUtils.isParsable(o)) return Long.parseLong(o); return null; } protected ApiRequest pkInit() { Wrap pkWrap = new Wrap().var("pk"); if(pk == null) { _pk(pkWrap); Optional.ofNullable(pkWrap.getO()).ifPresent(o -> { setPk(o); }); } return (ApiRequest)this; } public static Long staticSearchPk(ComputateSiteRequest siteRequest_, Long o) { return o; } public static String staticSearchStrPk(ComputateSiteRequest siteRequest_, Long o) { return o == null ? null : o.toString(); } public static String staticSearchFqPk(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrPk(siteRequest_, ApiRequest.staticSearchPk(siteRequest_, ApiRequest.staticSetPk(siteRequest_, o))); } ////////////// // original // ////////////// /** The entity original * is defined as null before being initialized. */ @JsonProperty @JsonInclude(Include.NON_NULL) protected Object original; /**
    The entity original * is defined as null before being initialized. *
    Find the entity original in Solr *
    * @param c is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _original(Wrap c); public Object getOriginal() { return original; } public void setOriginal(Object original) { this.original = original; } public static Object staticSetOriginal(ComputateSiteRequest siteRequest_, String o) { return null; } protected ApiRequest originalInit() { Wrap originalWrap = new Wrap().var("original"); if(original == null) { _original(originalWrap); Optional.ofNullable(originalWrap.getO()).ifPresent(o -> { setOriginal(o); }); } return (ApiRequest)this; } ///////// // pks // ///////// /** The entity pks * It is constructed before being initialized with the constructor by default. */ @JsonProperty @JsonFormat(shape = JsonFormat.Shape.ARRAY) @JsonSerialize(contentUsing = ToStringSerializer.class) @JsonInclude(Include.NON_NULL) protected List pks = new ArrayList(); /**
    The entity pks * It is constructed before being initialized with the constructor by default. *
    Find the entity pks in Solr *
    * @param c is the entity already constructed. **/ protected abstract void _pks(List c); public List getPks() { return pks; } public void setPks(List pks) { this.pks = pks; } @JsonIgnore public void setPks(String o) { Long l = ApiRequest.staticSetPks(siteRequest_, o); if(l != null) addPks(l); } public static Long staticSetPks(ComputateSiteRequest siteRequest_, String o) { if(NumberUtils.isParsable(o)) return Long.parseLong(o); return null; } public ApiRequest addPks(Long...objects) { for(Long o : objects) { addPks(o); } return (ApiRequest)this; } public ApiRequest addPks(Long o) { if(o != null) this.pks.add(o); return (ApiRequest)this; } @JsonIgnore public void setPks(JsonArray objects) { pks.clear(); if(objects == null) return; for(int i = 0; i < objects.size(); i++) { String o = objects.getString(i); setPks(o); } } public ApiRequest addPks(String o) { if(NumberUtils.isParsable(o)) { Long p = Long.parseLong(o); addPks(p); } return (ApiRequest)this; } protected ApiRequest pksInit() { _pks(pks); return (ApiRequest)this; } public static Long staticSearchPks(ComputateSiteRequest siteRequest_, Long o) { return o; } public static String staticSearchStrPks(ComputateSiteRequest siteRequest_, Long o) { return o == null ? null : o.toString(); } public static String staticSearchFqPks(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrPks(siteRequest_, ApiRequest.staticSearchPks(siteRequest_, ApiRequest.staticSetPks(siteRequest_, o))); } ///////////// // classes // ///////////// /** The entity classes * It is constructed before being initialized with the constructor by default. */ @JsonProperty @JsonFormat(shape = JsonFormat.Shape.ARRAY) @JsonInclude(Include.NON_NULL) protected List classes = new ArrayList(); /**
    The entity classes * It is constructed before being initialized with the constructor by default. *
    Find the entity classes in Solr *
    * @param c is the entity already constructed. **/ protected abstract void _classes(List c); public List getClasses() { return classes; } public void setClasses(String o) { String l = ApiRequest.staticSetClasses(siteRequest_, o); if(l != null) addClasses(l); } public static String staticSetClasses(ComputateSiteRequest siteRequest_, String o) { return o; } public ApiRequest addClasses(String...objects) { for(String o : objects) { addClasses(o); } return (ApiRequest)this; } public ApiRequest addClasses(String o) { if(o != null) this.classes.add(o); return (ApiRequest)this; } @JsonIgnore public void setClasses(JsonArray objects) { classes.clear(); if(objects == null) return; for(int i = 0; i < objects.size(); i++) { String o = objects.getString(i); addClasses(o); } } protected ApiRequest classesInit() { _classes(classes); return (ApiRequest)this; } public static String staticSearchClasses(ComputateSiteRequest siteRequest_, String o) { return o; } public static String staticSearchStrClasses(ComputateSiteRequest siteRequest_, String o) { return o == null ? null : o.toString(); } public static String staticSearchFqClasses(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrClasses(siteRequest_, ApiRequest.staticSearchClasses(siteRequest_, ApiRequest.staticSetClasses(siteRequest_, o))); } ////////// // vars // ////////// /** The entity vars * It is constructed before being initialized with the constructor by default. */ @JsonProperty @JsonFormat(shape = JsonFormat.Shape.ARRAY) @JsonInclude(Include.NON_NULL) protected List vars = new ArrayList(); /**
    The entity vars * It is constructed before being initialized with the constructor by default. *
    Find the entity vars in Solr *
    * @param c is the entity already constructed. **/ protected abstract void _vars(List c); public List getVars() { return vars; } public void setVars(String o) { String l = ApiRequest.staticSetVars(siteRequest_, o); if(l != null) addVars(l); } public static String staticSetVars(ComputateSiteRequest siteRequest_, String o) { return o; } public ApiRequest addVars(String...objects) { for(String o : objects) { addVars(o); } return (ApiRequest)this; } public ApiRequest addVars(String o) { if(o != null) this.vars.add(o); return (ApiRequest)this; } @JsonIgnore public void setVars(JsonArray objects) { vars.clear(); if(objects == null) return; for(int i = 0; i < objects.size(); i++) { String o = objects.getString(i); addVars(o); } } protected ApiRequest varsInit() { _vars(vars); return (ApiRequest)this; } public static String staticSearchVars(ComputateSiteRequest siteRequest_, String o) { return o; } public static String staticSearchStrVars(ComputateSiteRequest siteRequest_, String o) { return o == null ? null : o.toString(); } public static String staticSearchFqVars(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrVars(siteRequest_, ApiRequest.staticSearchVars(siteRequest_, ApiRequest.staticSetVars(siteRequest_, o))); } /////////////////// // timeRemaining // /////////////////// /** The entity timeRemaining * is defined as null before being initialized. */ @JsonProperty @JsonInclude(Include.NON_NULL) protected String timeRemaining; /**
    The entity timeRemaining * is defined as null before being initialized. *
    Find the entity timeRemaining in Solr *
    * @param w is for wrapping a value to assign to this entity during initialization. **/ protected abstract void _timeRemaining(Wrap w); public String getTimeRemaining() { return timeRemaining; } public void setTimeRemaining(String o) { this.timeRemaining = ApiRequest.staticSetTimeRemaining(siteRequest_, o); } public static String staticSetTimeRemaining(ComputateSiteRequest siteRequest_, String o) { return o; } protected ApiRequest timeRemainingInit() { Wrap timeRemainingWrap = new Wrap().var("timeRemaining"); if(timeRemaining == null) { _timeRemaining(timeRemainingWrap); Optional.ofNullable(timeRemainingWrap.getO()).ifPresent(o -> { setTimeRemaining(o); }); } return (ApiRequest)this; } public static String staticSearchTimeRemaining(ComputateSiteRequest siteRequest_, String o) { return o; } public static String staticSearchStrTimeRemaining(ComputateSiteRequest siteRequest_, String o) { return o == null ? null : o.toString(); } public static String staticSearchFqTimeRemaining(ComputateSiteRequest siteRequest_, String o) { return ApiRequest.staticSearchStrTimeRemaining(siteRequest_, ApiRequest.staticSearchTimeRemaining(siteRequest_, ApiRequest.staticSetTimeRemaining(siteRequest_, o))); } ////////////// // initDeep // ////////////// public ApiRequest initDeepApiRequest(ComputateSiteRequest siteRequest_) { setSiteRequest_(siteRequest_); initDeepApiRequest(); return (ApiRequest)this; } public void initDeepApiRequest() { initApiRequest(); } public void initApiRequest() { siteRequest_Init(); createdInit(); rowsInit(); numFoundInit(); numPATCHInit(); uuidInit(); idInit(); pkInit(); originalInit(); pksInit(); classesInit(); varsInit(); timeRemainingInit(); } public void initDeepForClass(ComputateSiteRequest siteRequest_) { initDeepApiRequest(siteRequest_); } ///////////////// // siteRequest // ///////////////// public void siteRequestApiRequest(ComputateSiteRequest siteRequest_) { } public void siteRequestForClass(ComputateSiteRequest siteRequest_) { siteRequestApiRequest(siteRequest_); } ///////////// // obtain // ///////////// public Object obtainForClass(String var) { String[] vars = StringUtils.split(var, "."); Object o = null; for(String v : vars) { if(o == null) o = obtainApiRequest(v); else if(o instanceof Map) { Map map = (Map)o; o = map.get(v); } } return o; } public Object obtainApiRequest(String var) { ApiRequest oApiRequest = (ApiRequest)this; switch(var) { case "siteRequest_": return oApiRequest.siteRequest_; case "created": return oApiRequest.created; case "rows": return oApiRequest.rows; case "numFound": return oApiRequest.numFound; case "numPATCH": return oApiRequest.numPATCH; case "uuid": return oApiRequest.uuid; case "id": return oApiRequest.id; case "pk": return oApiRequest.pk; case "original": return oApiRequest.original; case "pks": return oApiRequest.pks; case "classes": return oApiRequest.classes; case "vars": return oApiRequest.vars; case "timeRemaining": return oApiRequest.timeRemaining; default: return null; } } /////////////// // relate // /////////////// public boolean relateForClass(String var, Object val) { String[] vars = StringUtils.split(var, "."); Object o = null; for(String v : vars) { if(o == null) o = relateApiRequest(v, val); } return o != null; } public Object relateApiRequest(String var, Object val) { ApiRequest oApiRequest = (ApiRequest)this; switch(var) { default: return null; } } /////////////// // staticSet // /////////////// public static Object staticSetForClass(String entityVar, ComputateSiteRequest siteRequest_, String o) { return staticSetApiRequest(entityVar, siteRequest_, o); } public static Object staticSetApiRequest(String entityVar, ComputateSiteRequest siteRequest_, String o) { switch(entityVar) { case "created": return ApiRequest.staticSetCreated(siteRequest_, o); case "rows": return ApiRequest.staticSetRows(siteRequest_, o); case "numFound": return ApiRequest.staticSetNumFound(siteRequest_, o); case "numPATCH": return ApiRequest.staticSetNumPATCH(siteRequest_, o); case "uuid": return ApiRequest.staticSetUuid(siteRequest_, o); case "id": return ApiRequest.staticSetId(siteRequest_, o); case "pk": return ApiRequest.staticSetPk(siteRequest_, o); case "pks": return ApiRequest.staticSetPks(siteRequest_, o); case "classes": return ApiRequest.staticSetClasses(siteRequest_, o); case "vars": return ApiRequest.staticSetVars(siteRequest_, o); case "timeRemaining": return ApiRequest.staticSetTimeRemaining(siteRequest_, o); default: return null; } } //////////////// // staticSearch // //////////////// public static Object staticSearchForClass(String entityVar, ComputateSiteRequest siteRequest_, Object o) { return staticSearchApiRequest(entityVar, siteRequest_, o); } public static Object staticSearchApiRequest(String entityVar, ComputateSiteRequest siteRequest_, Object o) { switch(entityVar) { case "created": return ApiRequest.staticSearchCreated(siteRequest_, (ZonedDateTime)o); case "rows": return ApiRequest.staticSearchRows(siteRequest_, (Long)o); case "numFound": return ApiRequest.staticSearchNumFound(siteRequest_, (Long)o); case "numPATCH": return ApiRequest.staticSearchNumPATCH(siteRequest_, (Long)o); case "uuid": return ApiRequest.staticSearchUuid(siteRequest_, (String)o); case "id": return ApiRequest.staticSearchId(siteRequest_, (String)o); case "pk": return ApiRequest.staticSearchPk(siteRequest_, (Long)o); case "pks": return ApiRequest.staticSearchPks(siteRequest_, (Long)o); case "classes": return ApiRequest.staticSearchClasses(siteRequest_, (String)o); case "vars": return ApiRequest.staticSearchVars(siteRequest_, (String)o); case "timeRemaining": return ApiRequest.staticSearchTimeRemaining(siteRequest_, (String)o); default: return null; } } /////////////////// // staticSearchStr // /////////////////// public static String staticSearchStrForClass(String entityVar, ComputateSiteRequest siteRequest_, Object o) { return staticSearchStrApiRequest(entityVar, siteRequest_, o); } public static String staticSearchStrApiRequest(String entityVar, ComputateSiteRequest siteRequest_, Object o) { switch(entityVar) { case "created": return ApiRequest.staticSearchStrCreated(siteRequest_, (Date)o); case "rows": return ApiRequest.staticSearchStrRows(siteRequest_, (Long)o); case "numFound": return ApiRequest.staticSearchStrNumFound(siteRequest_, (Long)o); case "numPATCH": return ApiRequest.staticSearchStrNumPATCH(siteRequest_, (Long)o); case "uuid": return ApiRequest.staticSearchStrUuid(siteRequest_, (String)o); case "id": return ApiRequest.staticSearchStrId(siteRequest_, (String)o); case "pk": return ApiRequest.staticSearchStrPk(siteRequest_, (Long)o); case "pks": return ApiRequest.staticSearchStrPks(siteRequest_, (Long)o); case "classes": return ApiRequest.staticSearchStrClasses(siteRequest_, (String)o); case "vars": return ApiRequest.staticSearchStrVars(siteRequest_, (String)o); case "timeRemaining": return ApiRequest.staticSearchStrTimeRemaining(siteRequest_, (String)o); default: return null; } } ////////////////// // staticSearchFq // ////////////////// public static String staticSearchFqForClass(String entityVar, ComputateSiteRequest siteRequest_, String o) { return staticSearchFqApiRequest(entityVar, siteRequest_, o); } public static String staticSearchFqApiRequest(String entityVar, ComputateSiteRequest siteRequest_, String o) { switch(entityVar) { case "created": return ApiRequest.staticSearchFqCreated(siteRequest_, o); case "rows": return ApiRequest.staticSearchFqRows(siteRequest_, o); case "numFound": return ApiRequest.staticSearchFqNumFound(siteRequest_, o); case "numPATCH": return ApiRequest.staticSearchFqNumPATCH(siteRequest_, o); case "uuid": return ApiRequest.staticSearchFqUuid(siteRequest_, o); case "id": return ApiRequest.staticSearchFqId(siteRequest_, o); case "pk": return ApiRequest.staticSearchFqPk(siteRequest_, o); case "pks": return ApiRequest.staticSearchFqPks(siteRequest_, o); case "classes": return ApiRequest.staticSearchFqClasses(siteRequest_, o); case "vars": return ApiRequest.staticSearchFqVars(siteRequest_, o); case "timeRemaining": return ApiRequest.staticSearchFqTimeRemaining(siteRequest_, o); default: return null; } } ////////////// // toString // ////////////// @Override public String toString() { StringBuilder sb = new StringBuilder(); return sb.toString(); } public static final String CLASS_SIMPLE_NAME = "ApiRequest"; public static final String VAR_siteRequest_ = "siteRequest_"; public static final String VAR_created = "created"; public static final String VAR_rows = "rows"; public static final String VAR_numFound = "numFound"; public static final String VAR_numPATCH = "numPATCH"; public static final String VAR_uuid = "uuid"; public static final String VAR_id = "id"; public static final String VAR_pk = "pk"; public static final String VAR_original = "original"; public static final String VAR_pks = "pks"; public static final String VAR_classes = "classes"; public static final String VAR_vars = "vars"; public static final String VAR_timeRemaining = "timeRemaining"; public static final String DISPLAY_NAME_siteRequest_ = ""; public static final String DISPLAY_NAME_created = ""; public static final String DISPLAY_NAME_rows = ""; public static final String DISPLAY_NAME_numFound = ""; public static final String DISPLAY_NAME_numPATCH = ""; public static final String DISPLAY_NAME_uuid = ""; public static final String DISPLAY_NAME_id = ""; public static final String DISPLAY_NAME_pk = ""; public static final String DISPLAY_NAME_original = ""; public static final String DISPLAY_NAME_pks = ""; public static final String DISPLAY_NAME_classes = ""; public static final String DISPLAY_NAME_vars = ""; public static final String DISPLAY_NAME_timeRemaining = ""; public static String displayNameForClass(String var) { return ApiRequest.displayNameApiRequest(var); } public static String displayNameApiRequest(String var) { switch(var) { case VAR_siteRequest_: return DISPLAY_NAME_siteRequest_; case VAR_created: return DISPLAY_NAME_created; case VAR_rows: return DISPLAY_NAME_rows; case VAR_numFound: return DISPLAY_NAME_numFound; case VAR_numPATCH: return DISPLAY_NAME_numPATCH; case VAR_uuid: return DISPLAY_NAME_uuid; case VAR_id: return DISPLAY_NAME_id; case VAR_pk: return DISPLAY_NAME_pk; case VAR_original: return DISPLAY_NAME_original; case VAR_pks: return DISPLAY_NAME_pks; case VAR_classes: return DISPLAY_NAME_classes; case VAR_vars: return DISPLAY_NAME_vars; case VAR_timeRemaining: return DISPLAY_NAME_timeRemaining; default: return null; } } }